I have a function that takes a field with values separated by commas within the field and splits them to multiple rows.
Example:
Field - Interior
Value - abc,def,efg,ghi
Output:
ID Item
1 abc
2 def
3 efg
etc
This is working great thanks to help that I received on here.
Now I am combining multiple fields to a string.
Example:
Field1: abc, def
Field2: ghi, jkl
using
SELECT (Field1 + ',' + Field2) From .....
This is working great unless there is a field that has a NULL value. Then I get a NULL result.
Is there an easy way to only put the fields with value into my string and leave out the NULL fields? Some have one NULL field, some have multiple. I just need to get the string to work and get only the fields that have values.
Any suggestions are always appreciated.
Example:
Field - Interior
Value - abc,def,efg,ghi
Output:
ID Item
1 abc
2 def
3 efg
etc
This is working great thanks to help that I received on here.
Now I am combining multiple fields to a string.
Example:
Field1: abc, def
Field2: ghi, jkl
using
SELECT (Field1 + ',' + Field2) From .....
This is working great unless there is a field that has a NULL value. Then I get a NULL result.
Is there an easy way to only put the fields with value into my string and leave out the NULL fields? Some have one NULL field, some have multiple. I just need to get the string to work and get only the fields that have values.
Any suggestions are always appreciated.
Comment