if you really need to distinguish between the 2 at the CF level (-if-)...

you could just the coalesce() function...

SELECT
        column1,
        coalesce(column2, NULL, 'nothing here'), -- the column which holds
the potentially NULL value
        column3
FROM
        table
(etc...)

in this case, if the record has an empty string for 'column2', you'll
get an empty string.
if the record has a NULL value for 'column2', you'll get the string
'nothing here' (which, of course, you can change to suit your needs)

On 10/8/07, Richard White <[EMAIL PROTECTED]> wrote:
> perfect, thanks very much charlie :)
>
> in relation to the issue of null values being different to empty strings in 
> the database, am i right by saying the only way to get round this would be to 
> create a stored procedure that ran sql code to test for a null value or empty 
> string then pass back a result to cf telling it whether it is null or an 
> empty string?
>
> thanks
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290577
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to