Click here to Skip to main content
15,888,351 members
Home / Discussions / Database
   

Database

 
GeneralRe: Sql Query Pin
Srinivas Uttareshwar17-Sep-13 1:56
Srinivas Uttareshwar17-Sep-13 1:56 
GeneralRe: Sql Query Pin
Richard Deeming17-Sep-13 2:03
mveRichard Deeming17-Sep-13 2:03 
GeneralRe: Sql Query Pin
Srinivas Uttareshwar17-Sep-13 2:09
Srinivas Uttareshwar17-Sep-13 2:09 
GeneralRe: Sql Query PinPopular
Richard Deeming17-Sep-13 2:42
mveRichard Deeming17-Sep-13 2:42 
GeneralRe: Sql Query Pin
Simon_Whale17-Sep-13 3:15
Simon_Whale17-Sep-13 3:15 
GeneralRe: Sql Query Pin
Jörgen Andersson17-Sep-13 20:20
professionalJörgen Andersson17-Sep-13 20:20 
AnswerRe: Sql Query Pin
Mycroft Holmes17-Sep-13 12:57
professionalMycroft Holmes17-Sep-13 12:57 
Questionhow to check available cleaner Pin
Jassim Rahma16-Sep-13 9:28
Jassim Rahma16-Sep-13 9:28 
Hi,

I have a job_orders table in my database with cleaner_id, job_order_date, start_time and end_time.

I am inserting job orders in the database.

I would like to check before inserting for available staff

I tried the following:

SQL
SELECT cleaner_id, cleaner_name FROM cleaners WHERE cleaner_id NOT IN (SELECT cleaner_id FROM job_orders WHERE job_order_date = param_job_order_date AND start_time BETWEEN param_start_time AND param_end_time) AND is_active = TRUE ORDER BY cleaner_name;


then added a record with start_time = 10:00 and end_time = 13:00

when I tried to run the code again with start_time = 11:00 and end_time = 13:00 it works fine

but when I try start_time = 11:00 and end_time = 14:00 it will not determine that staff is already booked for 10:00 TO 13:00.

how can I fix this please?


http://www.JassimRahma.com[^]
http://www.rmc.bh[^]
http://www.ume.bh[^]
http://www.xoompage.com[^]
http://www.volow.com[^]
http://www.curesoftware.com[^]


Technology News @ www.JassimRahma.com

AnswerRe: check the end time also Pin
David Mujica16-Sep-13 9:43
David Mujica16-Sep-13 9:43 
GeneralRe: check the end time also Pin
Jassim Rahma16-Sep-13 9:46
Jassim Rahma16-Sep-13 9:46 
GeneralRe: check the end time also Pin
David Mujica16-Sep-13 10:03
David Mujica16-Sep-13 10:03 
GeneralRe: check the end time also Pin
Jassim Rahma30-Sep-13 23:03
Jassim Rahma30-Sep-13 23:03 
SuggestionRe: how to check available cleaner Pin
Richard Deeming16-Sep-13 10:58
mveRichard Deeming16-Sep-13 10:58 
QuestionTable UserId row population Pin
Member 914293616-Sep-13 9:21
Member 914293616-Sep-13 9:21 
AnswerRe: Table UserId row population Pin
Mycroft Holmes16-Sep-13 12:48
professionalMycroft Holmes16-Sep-13 12:48 
GeneralRe: Table UserId row population Pin
Member 914293616-Sep-13 15:08
Member 914293616-Sep-13 15:08 
QuestionMySQL - Can't create Visit table Pin
noislude15-Sep-13 4:42
noislude15-Sep-13 4:42 
AnswerRe: MySQL - Can't create Visit table Pin
PIEBALDconsult15-Sep-13 5:54
mvePIEBALDconsult15-Sep-13 5:54 
GeneralRe: MySQL - Can't create Visit table Pin
noislude15-Sep-13 6:15
noislude15-Sep-13 6:15 
GeneralRe: MySQL - Can't create Visit table Pin
Mycroft Holmes15-Sep-13 12:56
professionalMycroft Holmes15-Sep-13 12:56 
GeneralRe: MySQL - Can't create Visit table Pin
noislude15-Sep-13 13:01
noislude15-Sep-13 13:01 
GeneralRe: MySQL - Can't create Visit table Pin
Eddy Vluggen16-Sep-13 2:59
professionalEddy Vluggen16-Sep-13 2:59 
AnswerRe: MySQL - Can't create Visit table Pin
Bernhard Hiller16-Sep-13 2:23
Bernhard Hiller16-Sep-13 2:23 
AnswerRe: MySQL - Can't create Visit table Pin
Richard Deeming16-Sep-13 2:25
mveRichard Deeming16-Sep-13 2:25 
QuestionSQL Query Help! Pin
Member 1026694314-Sep-13 16:33
Member 1026694314-Sep-13 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.