> null="#Not(Len(FORM.Time_Spent))#"
All good suggestions. Though you should use trim(), as in Dan
Bracuk's example, if you want to ignore whitespace.
To elaborate to the nth degree, the technique works by
setting the "null" attribute to true or false based on the results
of the conditional test. When null="true" (or the equivalent) the
cfqueryparam "value" is ignored and a NULL is sent to the database.
Otherwise, the "value" is used.
Here "null" will be true when FORM.Notes is an empty string
or just whitespace.
<cfqueryparam value="#FORM.Notes#"
null="#not len(trim(FORM.Notes))#"
cfsqltype=" your column type">
Also, use a test that is appropriate for your value and
column type. If your value should be numeric you might want to use
IsNumeric instead of checking for an empty string.
<cfquery value="#FORM.yourFieldName#"
null="#not IsNumeric(FORM.yourFieldName)#"
cfsqltype=" your column type">