Depending on your database, you could also use ISNULL() or IFNULL()
functions - much simpler than the case statement, but less portable.

For example, in Microsoft SQL Server:

http://msdn2.microsoft.com/en-us/library/ms184325.aspx

The case statement below would look like this instead:

ISNULL(col,'YOURINDICATORFORNULL) AS col

Rick

On 10/8/07, Qasim Rasheed <[EMAIL PROTECTED]> wrote:
> Instead of Stored procedure, you can simply do this
>
> CASE WHEN col is NULL THEN 'YOURINDICATORFORNULL'
> ELSE col
> END AS col
>
> HTH
>
> 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
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

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

Reply via email to