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 |
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2009-07-21 : 16:25:45
|
| HelloI a DBA who has been attacked by a Fiancial analyst to find him an answer to his msquery issue. spituyThe issue is with renameing column heading is MS query.ok here it goesselect columna,columnb,columna+columnb as "combine from testTable where columna=1this works fineyou get:columna columnb combine1 1 2when I union I lose the column heading of combine any ideas why?select columna,columnb,columna+columnb as "combine from testTable where columna=1unionselect columna,columnb,columna+columnb as "combine from testTable where columna=4you get:columna columnb 1 1 24 2 6 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-21 : 16:32:01
|
select columna, columnb, columna + columnb as [combine]from testTable where columna = 1unionselect columna, columnb, columna + columnb as [combine]from testTable where columna = 4 N 56°04'39.26"E 12°55'05.63" |
 |
|
|
shebert
Yak Posting Veteran
85 Posts |
Posted - 2009-07-21 : 16:35:46
|
| That worked Thanks |
 |
|
|
|
|
|