Here's an OT quickie for all of you into that kinky whips, chains, and
whipped stuff...
I have a query that pulls a record accourding to the Now() function.
It's looking to find out "who's on-call now" and it checks that NOW()
is between the shift_start and the shift_end.
Now.
Is there an easy way to find out whose shift is next in line? Maybe do
a dateAdd???
Here's the query:
<cfquery name="getCurrent" datasource="ONCALL">
SELECT *
FROM
DIVISIONS,
DOCTORS,
ONCALL_SHIFTS
WHERE
DOCTORS.Doc_ID = ONCALL_SHIFTS.Doctor_ID
AND
ONCALL_SHIFTS.Division_ID = DIVISIONS.DIVISIONID
AND
<cfqueryparam cfsqltype="cf_sql_date"
value="#DateFormat(Now(),'mm/dd/yyyy')#">BETWEEN shift_start AND
shift_End
ORDER BY DivisionName
</cfquery>
Candace K. Cottrell, Web Developer
The Children's Medical Center
One Children's Plaza
Dayton, OH 45404
937-641-4293
http://www.childrensdayton.org
[EMAIL PROTECTED]
"There is no right price for the wrong product, even if it is
inexpensive and delivered on time."
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: Next in line Candace Cottrell
- Re: Next in line Ben Doom
- Re: Next in line Jochem van Dieten
- Re: Next in line Ben Doom
- Re: Next in line Ben Braver
- RE: Next in line Harkins, Patrick
- RE: Next in line Lyons, Larry
- Re: Next in line Candace Cottrell
- Re: Next in line Ben Doom
- Re: Next in line Ben Braver
- RE: Next in line Adam Reynolds