I have the following
SELCT ( DEF1 + '|' +DEF2 + '|' +DEF3 + '|' + DEF4 + '|' + DEF5) As DEFVal
FROM TableA
How can I check for NULL for each DEF SO I only DEFF1 + '|' + DEF... that is not null?
For Example, if DEF1 = BOY and DEF4 = Dog and then it would return BOY | Dog in DEFval.
Hi Thanks for the reply, but unfortuantly this is doing the same thing. That is if they were all null for example |||||||. I need it to eliminate the pipes where the value is null.
So in my example if only DEF1 = BOY and DEF4 = Dog had values the only pipe I would see is the one between them.