Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
Lets say I have Table A:
Table A
- Id
- EnterDate
- StaffNum
- Site
I need to find:
Query 1. All rows from Table A where Site = 'North'
Query 2. For each row returned in Query 1, I then need to find any rows in Table A where the StaffNum is equal, Site = 'South' and EnterDate is greater than the EnterDate returned in Query 1.
Lost on this one, any advice on starter code would be greatly appreciated.
Thanks.
"For each row returned in Query 1,"
Should the Query 2 then match first on id field?
-Rob
Hi Rob
Thanks for the reply.
Query 2 should first match StaffNum, e.g. if Query 1 returned a row where StaffNum was 12345, then Query 2 then needs to find all rows in Table A where StaffNum is 12345, but also where Site = 'South' and EnterDate greater than the EnterDate returned in Query 1.
Cheers.