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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For XML Auto and Nulls 1

Status
Not open for further replies.

aspivey

Programmer
Apr 25, 2001
4
US
If I execute a 'Select * from XYZ for XML Auto', the result set doesn't contain any fields that had nulls. I need those fields also even if they are null value. Can someone provide any help?

 

List the columns in the Select statement and use the IsNull function to convert nulls to empty strings.

Select
isnull(colA,'') As ColA,
isnull(colB,'') As ColB,
isnull(colC,'') As ColC,
isnull(colD,'') As ColD
From XYZ Fro XML Auto Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Thanks Terry,

Spot on with that advice.

Archie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top