Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing Null values in SQL

Status
Not open for further replies.

SteveCarrier

Programmer
Aug 6, 2002
34
CA
Hello.

When you have a recordset which contains null values is there a way for you to instruct the SQL to replace the null values with some other value, such as ""(an empty string?).

I may have, for example:
Select ProductID, ProductDesc, ProductSDesc, ProductMDesc from Product where ProductID = strProduct.

For some records ProductSDesc and/or ProductMDesc are null. This causes errors in my code unless I use an isnull() test. I wanted to avoid this by altering the SQL statement if possible.

Thanks alot.

Steve Carrier
 
Problem solved. Using the Nz() function worked like a charm.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top