|
-
Sep 20th, 2009, 03:33 PM
#1
Thread Starter
Lively Member
SQL Query help please
[VS 2008 / VB.Net / MS SQL 2005]
Hello, I have to create a query at work tomorrow, but I can't see a way to do it.
I want to return a list of customers from...
tblCUS
AccID - AccNo - AccName
...where there's an entry pair of HeadID-ValueID in the Analysis table...
tblANALYSYS
AccID - HeadID - ValueID (all integers)
...subject to up to 8 search criteria...
sHeadID_1 - sValueID_1
sHeadID_2 - sValueID_2
...
sHeadID_8 - sValueID_8
If any of sValuID_n are zero, I want the customer, subject to the other search criteria matching. (I can handle this in code when building the query - either 'ValueID=sValueID' or 'ValuID>0').
Any suggestions as to how I should approach this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|