G
Guest
Hi All....I have a complex problem I am trying to solve. Any help you can
provide would be greatly appreciated. Below is an illustration to help you
understand.
TblCasIDDetails tblRental
CasID Casid Returned
1 1 Y
2 2 Y
3 3 N
4 4 N
5 2 Y
6 1 N
What I am trying to do is fetch the CasID from tblCasIDDetails but only the
ones that are not rented. The second tblrental stores the casids that have
been rented or returned. So for the above example my output should include
2,5,6 because 5 and 6 have not been rented and 2 was rented but the return
flag is set to Y. While 1 was rented and returned but has been rented again
(last record). I tried every type of join but it doesn't work. The CasID is
unique field. Please help.
provide would be greatly appreciated. Below is an illustration to help you
understand.
TblCasIDDetails tblRental
CasID Casid Returned
1 1 Y
2 2 Y
3 3 N
4 4 N
5 2 Y
6 1 N
What I am trying to do is fetch the CasID from tblCasIDDetails but only the
ones that are not rented. The second tblrental stores the casids that have
been rented or returned. So for the above example my output should include
2,5,6 because 5 and 6 have not been rented and 2 was rented but the return
flag is set to Y. While 1 was rented and returned but has been rented again
(last record). I tried every type of join but it doesn't work. The CasID is
unique field. Please help.