[dba-SQLServer] SQL - What's a null in Reporting Services)

Eric Barro ebarro at verizon.net
Thu Jan 19 21:05:32 CST 2006


ISNULL(x, y) is more efficient than COALESCE. ISNULL returns x if it's not
null otherwise it returns y. Use COALESCE if you have more than 1 value to
evaluate. It returns the first non-null value. 

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Thursday, January 19, 2006 6:41 PM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] SQL - What's a null in Reporting Services)

Hi Susan and Hi Eric
Many thanks
I used Coalesce in the underlying SQL

Many thanks

DD
 



-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Thursday, January 19, 2006 7:17 PM
To: dba-sqlserver at databaseadvisors.com
Subject: [dba-SQLServer] SQL - What's a null in Reporting Services

Hello all

In Access to test for null and replace it with x I would do something like

Iif(isnull([SomeField]),"NothingThere","SomethingThere")

When I try this in a text box in reporting services it says

Replace Null with System.DBNull

So I did and now get the error...

dBNull is a type in system and cannot be used as an expression

<Sigh>

Anyone know what the correct syntax should be to test for Null and put in my
own value if true and 

Leave the FieldValue if not true?

Many thanks

Darren

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.18/230 - Release Date: 1/14/2006
 

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


__________ NOD32 1.1372 (20060119) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the dba-SQLServer mailing list