CF does not "know" nulls.  If your query object, you can look for an
empty string.

However, if you have valid results that are empty strings, in addition
to valid nulls, in your database, you can use a NULL function to return
a placeholder value.

In certain DBs, the function is "isNull()".  In others, it may be
"coalesce()". 

SELECT col1, COALESCE(col2, "{{NULL}}") AS col2
FROM table
WHERE join goes here

M!ked

-----Original Message-----
From: Chris Velevitch [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 28, 2005 5:59 AM
To: CF-Talk
Subject: Re: How to test for null in a query object

On 12/28/05, James Holmes <[EMAIL PROTECTED]> wrote:
> You could do a Query of Queries to select rows where the chosen column
IS NULL.

Actually, I'm looping through each row in the query object and building
a structure. The join is a one-to-many relationship where there can be 0
or more rows in the outer join to the main table. Your suggestion sounds
messy to implement.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227746
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to