General information
Category:
Database DAO/RDO/ODBC/ADO
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only