1
Answer

Select a driver being used for first time

raven daniel

raven daniel

12y
1.2k
1
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)