RE: 0ut 0f 0ffice Dates

2003-06-09 Thread Mike Townend
m van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, June 9, 2003 14:42 To: CF-Talk Subject: Re: 0ut 0f 0ffice Dates Mike Townend wrote: > Like the sound of the logic, however the code doesn't run on SQL2K as > the Max (and therefore Min) functions only take t

Re: 0ut 0f 0ffice Dates

2003-06-09 Thread Jochem van Dieten
Mike Townend wrote: > Like the sound of the logic, however the code doesn't run on SQL2K as the > Max (and therefore Min) functions only take the one parameter and so is not > running :( Use CASE. Jochem ~| Archives: http://ww

RE: 0ut 0f 0ffice Dates

2003-06-09 Thread Mike Townend
t: Re: 0ut 0f 0ffice Dates How about checking that the number of days somebody is OOO is equal to the number of days between now and the deadline? If that serves your purpose, use the query below (check the datediff syntax, I don't use non-standard date functionality very often).

Re: 0ut 0f 0ffice Dates

2003-06-09 Thread Jochem van Dieten
Mike Townend wrote: > > SELECT * > FROM OutOfOffice > WHERE UserID = @UserID > AND ( > (OutOfOfficeTo BETWEEN @Now AND @DeadLine) > OR > (OutOfOfficeFrom BETWEEN @Now AND @DeadLine) > ) > > > Which gets me all

RE: 0ut 0f 0ffice Dates

2003-06-09 Thread Mike Townend
? Or should I do the processing on the CF side? -Original Message- From: Mike Townend [mailto:[EMAIL PROTECTED] Sent: Monday, June 9, 2003 13:25 To: CF-Talk Subject: RE: 0ut 0f 0ffice Dates It was sent to cf-sql.. We&#

Re: 0ut 0f 0ffice Dates

2003-06-09 Thread Jochem van Dieten
Mike Townend wrote: > > We're using SQLServer 2K If it support OVERLAPS (check the manual) it would be something like: WHERE UserID = 6 AND (0ut0f0fficeFrom,0ut0f0fficeTo) OVERLAPS ('2003-06-06','2003-06-10') Else, how about: SELECT * FROM 0ut0f0ffice WHERE UserID = 6 AND 0ut0f0fficeFrom BETW

RE: 0ut 0f 0ffice Dates

2003-06-09 Thread Mike Townend
It was sent to cf-sql.. We're using SQLServer 2K -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, June 9, 2003 13:10 To: CF-Talk Subject: Re: 0ut 0f 0ffice Dates Mike Townend wrote: > > Sorry for the x-post x-posted to what? > I wa

Re: 0ut 0f 0ffice Dates

2003-06-09 Thread Jochem van Dieten
Mike Townend wrote: > > Sorry for the x-post x-posted to what? > I was wondering if anyone has an idea as to how I can do this. Currently I > have a task system whereby you can allocate jobs to users, we have a table > that can record that you are 0ut of the 0ffice for a specified time, I need