SELECT VEN.VENNUM, (VEN.TITLE + ' ' + VEN.FNAM + ' ' + VEN.LNAM) AS PERSON ...
When any of the fields inside of the PERSON Field are Null it returns a Null. How can I prevent this?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
SELECT VEN.VENNUM, LTrim(Coalesce(VEN.TITLE,'') + ' ' + Coalesce(VEN.FNAM,'') + ' ' + Coalesce(VEN.LNAM,'')) AS PERSON ...
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Put the space concatenation in with the potentially NULL column in the COALESCE - so if null, no title and no space.
We do that often.
you are the man!
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."