Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
midpenntech
Posting Yak Master
137 Posts |
Posted - 2009-04-23 : 15:29:06
|
I have have 3 columns that I need to join into one column. Custnuma,custnumc,custnumd would like to make it allcustnumexamplecustnuma,custnumc,custnumd12331,Null,NullNull,43523,NullNull,Null,95423How i would want it then is allcustnum123314352395423 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-04-23 : 15:33:53
|
Is your example actually the result of a GROUP BY query gone bad?You can always use SELECT COALESCE(CustNumA, CustNumC, CustNumD) AS AllCustNumFROM ...Or fix the original query is such exists. E 12°55'05.63"N 56°04'39.26" |
|
|
midpenntech
Posting Yak Master
137 Posts |
Posted - 2009-04-23 : 15:34:51
|
no it is not, i have mutiple views i needed to create that had case's from diff tables. |
|
|
Qualis
Posting Yak Master
145 Posts |
Posted - 2009-04-23 : 15:34:56
|
If only one customer number will be populated amongst the 3, then this would work:Select Coalesce(custnuma, custnumc, custnumd) As allcustnum Edit:Bah!! from the time I opened the post to when I submitted my answer, I was twarted!! Gotta be quicker on the draw I see... |
|
|
|
|
|
|
|