CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 SQL Server RETURN NULL

Print topic Send  topic

Author Message
duploX

Posts: 14
Posted: 05/22/2007, 8:54 PM

I created a SQL Server Query using the CodeCharge Builder.

What do I have to do in order to return NULL if a field is empty. I have several fields which I need to SUM UP. But the records where those fields are empty are not displayed.

Please help.

Christoph
View profile  Send private message
smalloy

Posts: 107
Posted: 06/07/2007, 2:28 PM

You may need to alter your Query, SQL server removes Nulls from datasets so use the SQl function IsNull.

ISNULL
Replaces NULL with the specified replacement value.

Syntax
ISNULL ( check_expression , replacement_value )

Try:

  
Select IsNull(myfield, '')   
From table  
Where xxxxxxxx  


This should do the trick.

Good luck,
Steve
_________________
Anything can be done, just give me time and money.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.