Use the isNull() function directly in the SQL. Mike
-----Original Message----- From: Steve Milburn [mailto:[EMAIL PROTECTED] Sent: Friday, March 24, 2006 2:50 PM To: CF-Talk Subject: Re: CFIF and null values What is the data type of the field in the database? If it is a char, it could be an empty string of the length of the field specification, ie char(10). In which case, adding a trim to the function should work - trim(len(expr3)) eq 0 Steve Richard Colman wrote: > I have a null value being returned from a query. I would like to catch it > and give it a value before proceeding. > > So, assuming that CF returns a null value as a null string, I tried the > following: > > <cfif len(expr3) eq 0> > <CFSET expr3 = 0> > </cfif> > > Also > > <cfif expr3 = ""> > <CFSET expr3 = 0> > </cfif> > > However, neither of these are working. > > Any suggestions appreciated. > > Rick Colman > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236178 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

