raven daniel

raven daniel

  • NA
  • 123
  • 42.8k

Select a driver being used for first time

Feb 28 2012 5:15 AM
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

Answers (1)