ASP to Access dababase - SQL join query

khiro

New Member
Imagine two tables in the same Access database;\[code\]Transaction - Date - Time - TransactionNumber - UniqueID - Exception (boolean)\[/code\](TransactionNumber is sequential integer for records of the same day, and then starts again from 0 each day. Key field is UniqueID)\[code\]Exceptions - ExceptionNumber - Date - Time - TransactionNumber - ExceptionReason\[/code\](ExceptionNumber is sequential integer for records of the same day, and then starts again from 0. TransactionNumber is the same value from Transactions where Date is the same in both tables)Where Transaction.Exception is TRUE, a record relating to that Transaction will also appear in Exceptions. I want to output ALL records from Transaction, and where Transaction.Exception happens to be TRUE for a record, then I want a column which shows the Exception.ExceptionReason. For the other records, it should be blank.I've no idea how this is possible. If you joint the two tables via the Date and TransactionNumber fields, you'll only see records where Transaction.Exception = TRUE.
 
Back
Top