What you can do is take advantage of the "null" attribute in the tag.
<cfqueryparam cfsqltype="" value="" null="" />
Use an _expression_ in the null attribute like this:
<cfqueryparam cfsqltype="someType" value="someValue"
null="#Len(someVariable) EQ 0#" />
Now if the _expression_ returns true, the value is ignored and NULL is used.
If it returns false, the value is used...
Does that help?
Mike
> -----Original Message-----
> From: Arden Weiss [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 06, 2004 10:44 PM
> To: CF-Talk
> Subject: How to post a null date variable to a table
>
> How to post a null date to SQL Server 2000 via a variable
> instead of just using the word "Null" or do I have to use an
> embedded CASE statement.
>
> <CFQUERY NAME="UP2" DATASOURCE="test">
> UPDATE mytable
> SET
> APPL_DATE = #APPL_DATE# , <-- This has a valid date and works fine
> APRV_DATE = Null <-- This posts a Null Date to "mytable"
> WHERE L_NUMBER = '#mFINDIT#'
> </CFQUERY>
>
> Hope the question is clear...
> ________________________________
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

