Got 2 tables, drivers and AllocatedHistory
i have to select a driver thats being allocated for the first time to a vehicle.
So it has to be like where entry is only 1 or less than 2. because when he is allocated, an entry will be generated in the allocation table.
Select tblU.UserID
From
Users tblU
Where
and this is where im stuck
Where
(select Count(tblU.UserID) as ID
From
AllocatedHistory tblH
Where
ID < 2
)
Im not sure if im on the right road here. Thank you advance for help
Select a driver being used for first time
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Feb 28, 2012, 7:45 PM EST