Subject Re: Can a SQL parameter have a string value passed to a date field?
Author Adam
Do you mean that for param1 , you want to pass in the number of years?

you could change that line to

WHERE (P.BIRTH_DATE <= CURRENT_DATE - (:Param1 * 365)

but

don't forget the leap years. I would get your client spplication to
pass in the number of days to be safe.


--- In firebird-support@yahoogroups.com, "M Tuttle \(KS\)"
<miket@s...> wrote:
> Greeting All,
>
> Looking at the SQL below, is there any way to pass the following
value for
> Param1: CURRENT_DATE - (65 * 365)
>
> SELECT DISTINCT P.*
> FROM PERSON P
> WHERE (P.BIRTH_DATE <= :Param1
> AND P.LIST_DATE between :Param2 and :Param3)
>
> Param1 cannot be hardcoded in this SQL as it is a user defined
value.
>
> Param2 and Param3 will have a regular date value entered.
>
> Any tips appreciated.
>
> Michael Tuttle
> Software Technologies, Inc.
> Topeka, KS