Click here to Skip to main content
15,887,358 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm currently having a problem on getting the vacant time slots, I have a table for the timeslots 8:00-22:00(timeTB) 1 row per time, and a record for occupied time for the day in the other table(CustomerTimeTB), how can i remove to the list the occupied time on timeTB?
Posted

1 solution

There must be certain relationg between the timeTB & CustomerTimeTB. You would need to use that such that you can get specific entries related to a timeslot.

Looks into your database designed and try that out.

OR

Though the above approach would be easy, in case you fail to do it, you can also do something like (not recommended!) get all the needed records from timeTB first and then from CustomerTimeTB. Then compare and filter the needed ones.
 
Share this answer
 
Comments
royneilfranco 26-Feb-11 3:28am    
Can I have SQL code for that? sorry I'm new on this field
Sandeep Mewara 26-Feb-11 3:55am    
Yes, You should be able to write SQL query and do the stuff - preffered option.
royneilfranco 26-Feb-11 4:50am    
Can i have sample code?
Sandeep Mewara 26-Feb-11 4:53am    
It's your DB, you have designed it and using it.

Max I can say here online about it. There would be a JOIN in query with a WHERE clause.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900