Hi All,
First post and absolute begginer.
I have 2 dbf tables. One has todays drivers and the other has drivers history(ie each past driving job) I want to create a dataset? which has the driving history for each driver engaged today so that I can do some stuff with it.
The drivers(today) table has the drivers name and some other details for over all performance
The drivers (history) has hundreds of drivers each with a name and the details of that particular job. So any one driver could have as many as 500 jobs (records/lines).
The logic (there is a funny one) is this :
Select all (fields/entire row of record) from driver(history) that corespond to all names from Driver(today)
I can access the databases ok and up to now I had a loop where I create a dataset for each drivers history as I move through the todays roster... Very slow Using the folowing sql where the CurrentDriver is a string value of each and all drivers in todays table
"Select * from DHistory.DBF WHERE [DRIVER] = "& "'" & CurrentDriver & "'"
Im trying to write it so that all the drivers historys are returned at once so that I can work with them further.
I have so far this and it dosent work (obviously)
"Select * FROM DHistory.DBF,DToday.DBF where DHistory.DRIVER = DToday.DRIVER"
If someone could tell me what I need to do to 'join' these tables together and if infact this can be done using the resources I outlined above.
Thank you so much
Michal
First post and absolute begginer.
I have 2 dbf tables. One has todays drivers and the other has drivers history(ie each past driving job) I want to create a dataset? which has the driving history for each driver engaged today so that I can do some stuff with it.
The drivers(today) table has the drivers name and some other details for over all performance
The drivers (history) has hundreds of drivers each with a name and the details of that particular job. So any one driver could have as many as 500 jobs (records/lines).
The logic (there is a funny one) is this :
Select all (fields/entire row of record) from driver(history) that corespond to all names from Driver(today)
I can access the databases ok and up to now I had a loop where I create a dataset for each drivers history as I move through the todays roster... Very slow Using the folowing sql where the CurrentDriver is a string value of each and all drivers in todays table
"Select * from DHistory.DBF WHERE [DRIVER] = "& "'" & CurrentDriver & "'"
Im trying to write it so that all the drivers historys are returned at once so that I can work with them further.
I have so far this and it dosent work (obviously)
"Select * FROM DHistory.DBF,DToday.DBF where DHistory.DRIVER = DToday.DRIVER"
If someone could tell me what I need to do to 'join' these tables together and if infact this can be done using the resources I outlined above.
Thank you so much
Michal