> Is there some trick to doing a less then (<) comparison combined with a
> <cfqueryparam> tag?
>
> I've got a query something like this.
>
> SELECT *
> FROM aTable
> WHERE DateField = (SELECT Max(DateField) FROM aTable WHERE DateField <
> <cfqueryParam value="#url.date#"...>)
>
> I'm trying to select the previous record in aTable by date to the value in
> url.date, which corresponds to another record in aTable..
>
> 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. < does not work in a SQL statement.
SELECT *
FROM aTable
WHERE DateField = (SELECT Max(DateField) FROM aTable WHERE
<cfqueryParam value="#url.date#"...> > DateField )
Don't forget to file a bug if this works ;-)
Jochem
--
When you don't want to be surprised by the revolution
organize one yourself
- Loesje
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

