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

Wont display a null value 1

Status
Not open for further replies.

saintedmunds

Technical User
Apr 7, 2006
78
GB
HI

I have 3 columns Title Forename Surname
In my SP I have Title + ' ' + Forename + ' ' + Surname

This works great if there is a value in each field but if say i only Title and Surname it does not diplay anything.

How can i get around this?

Cheers
 
Use isnull

SELECT ISNULL(Title,'') + ' ' + ISNULL(Forename,"") + ' ' + ISNULL(Surname,'')



- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top