'Concatenating columns and rows together
I have a table with aircraft's and customer options in it.
eg
Cust | opt1 | opt2
------------------------
A | abc | def
B | | mno
F | | pqr
A | | ghi
I use
SELECT
Cust,
opt1 + opt2 as options
FROM myDB where Len(opt1) >1 or Len(opt2) >1
Of course I get cust A twice in my result list
Cust | options |
------------------------
A | abcdef |
A | ghi |
B | mno |
F | pqr |
How can I condense this query further so that the result becomes:
Cust | options |
------------------------
A | abcdefghi |
B | mno |
F | pqr |
Thanks! (Working on SQL server Express)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
