bullyboy69
Technical User
Morning
Have a question. I have a webpage that gets generated with fields from a SQL database. I have 2 fields, firstname and lastname and use another field name that contains both called name. I want to write an if statement so that if the firstname is null then just the lastname is the name eg.
if firstname is null or = '' then
name = lastname
else
name = firstname + lastname
How do I do this in SQL as its proving to be a right pain!
Thanks
Nick
Have a question. I have a webpage that gets generated with fields from a SQL database. I have 2 fields, firstname and lastname and use another field name that contains both called name. I want to write an if statement so that if the firstname is null then just the lastname is the name eg.
if firstname is null or = '' then
name = lastname
else
name = firstname + lastname
How do I do this in SQL as its proving to be a right pain!
Thanks
Nick