Original Message:
> From: Ian Skinner <[EMAIL PROTECTED]>

> SELECT *
> FROM aTable
> WHERE DateField = (SELECT Max(DateField) FROM aTable WHERE DateField <
> <cfqueryParam value="#url.date#"...>)
>
....
> This does not throw an error, but it also does not return any records when
> there is one that should be returned.  I notice in the debug window that the
> SQL statement is truncated at the first left angle bracket (<).  I suspect
> it is being treated as an open tag character, but I'm not sure what to do
> about it if it is.  &lt; does not work in a SQL statement.

There's no trick with using the less than sign with cfqueryparam.  However, there are tricks to doing date comparisons that are different for different databases.  I'd say look to see if your database has a date comparison function.

Scott

---------------------------
Scott Brady
http://www.scottbrady.net/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to