eziokolo wrote:
> In my Inserts (MS SQL 2005) for Position which is a
number field, I always
> default it to 0 when there is no value. See below
> <cfargument name="argtposition" type="any"
required="No" default="0">
>
> Is there a way I could set the Argument to default to
"Null"?
> When I set the default to Null it started throwing
errors. How can I default
> it to null instead of 0 (zero)? see below
> <cfargument name="argtposition" type="any"
required="No" default="Null">
>
Not that way. That will set argtPossition to the four
character string
"NULL" not a null value.
In your SQL statement, I presume and hope you are using
<cfqueryparam...> . If so it has a NULL parameter. Thus
you can put
this into your SQL query.
<cfqueryparam ... null="yes">
This will override any value or other content and set the
field to null
in the database. Presumable you want to set this dynamically
with some
expression that evaluates to a yes|no boolean true|false
value.
<cfqueryparam ... null="#argtposition EQ 0#">