You're so smart... that's why they pay you the big bucks. ;)

Sometimes I wonder what a right-brain like me is doing in this field...

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."

>>> [EMAIL PROTECTED] 3/2/2004 2:44:52 PM >>>
How about something like

select top 1 * where blah and startdate > '#now()#' order by startdate

--benD

Candace Cottrell wrote:

> 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]

Reply via email to