Link to home
Start Free TrialLog in
Avatar of Tech_Men
Tech_MenFlag for Israel

asked on

combine sql column return null

hi

i have a table whit firstName and lastName columns
in my sql query i need to combine then like that
select lastName +' '+firstName as fullName
if one of the column are null i am getting null even i have a name in the lastName or FirstName col
how can i fix that ?

thanks ...
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can use ISNULL function:

select ISNULL(lastName,'') +' '+ISNULL(firstName,'') as fullName 

Open in new window

Avatar of Tech_Men

ASKER

thx