Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filter found record between 2 Tables
Message
From
26/07/2000 23:34:14
 
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00396488
Message ID:
00397434
Views:
9
>>I have 2 Tables
>>(1)Customer - CustCode,.......
>>(2)CustTrans - CustCode, CaseClosed (boolean),.......
>> (will have multiple records of same CustCode)
>>
>>I would like to get all rows from the Customer table, but
>>exclude those rows that the CustCode is found in the CustTrans
>>table AND with the CaseClosed status is "False".
>>
>>How should my SQL statement be like, pls advise, thanks.
>
>Select *
>FROM Customer LEFT OUTER JOIN CustTrans
>ON Customer.CustCode = CustTrans.CustCode
>WHERE CustTrans.CaseClosed = True

I tried the statement but I have one issue.
It will return all rows if the CustTrans.CaseClosed = True.

I only want to get rows that CustTrans.CaseClose is not "True"
or another words not found in the CustTrans table that having the
CaseClose status as "True".

But I can't use "False" for checking, because there will be some
records that have the status "False", represention the case have
been closed.

Do I need to have multiple SELECT statement? Pls advise, thanks alot.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform