Noor,
Try this:
SELECT user_info.*
FROM user_info
WHERE user_info.getlogin_ready NOT IN ('0','1')
AND DATEDIFF(hour,user_info.getlogin_ready,getdate()) < 24
Colin
> -----Original Message-----
> From: Noor Farizan Morshidi (AMS E-Business)
> [mailto:[EMAIL PROTECTED]]
> Sent: 29 May 2001 01:58
> To: SQL
> Subject: SQL PROBLEM
>
>
> here is my coding. Actually i want to write a coding
> including the [<cfset
> Howmanyhour = Abs(DateDiff("H",now(),getlogin_ready))>
> <cfif Howmanyhour LT "24">] in my sql so that i can output
> the records in
> the cfmail without the cfset and cfif statement. Can anyone
> please help
> me. I really needed it..
>
> regards
>
> my coding
> -------------
>
> <cfquery name="GetRecordCollected" datasource="clientmaster"
> dbtype="ODBC">
> Select *
> from user_info
> where getlogin_ready <> '1' OR getlogin_ready <> '0'
> </cfquery>
>
> <cfmail to="[EMAIL PROTECTED]" from="[EMAIL PROTECTED]"
> subject="Collection New web userid and Password">
>
> Collected
> --------------------------------------------------------------
> --------------------------
> <cfloop query="GetRecordCollected">
> <cfset Howmanyhour = Abs(DateDiff("H",now(),getlogin_ready))>
> <cfif Howmanyhour LT "24">
> MY OUTPUT
> </cfif>
> </cfloop>
> </cfmail>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists