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 |
|
dcarva
Posting Yak Master
140 Posts |
Posted - 2006-04-19 : 23:59:47
|
| Hello,Can a column have more than two aliases? I have a case the same column has the data that is being referenced by 2 different aliases. I would like to do something like this:SELECT Value1 AS val1, val2FROM Table1Thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-20 : 00:02:27
|
NO. only one alias.However you can do thisSELECT Value1 AS val1, Value1 as val2FROM Table1 KH |
 |
|
|
dcarva
Posting Yak Master
140 Posts |
Posted - 2006-04-20 : 00:03:19
|
| Yeah, I was hoping to not have to do that because that returns double the data. I have some ideas though.Thanks!! |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-20 : 00:34:02
|
Why do you need 2 alias of the same column ? KH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-20 : 01:41:55
|
| >>I have a case the same column has the data that is being referenced by 2 different aliases.Can you explain why you need this?Post some sample data and the result you wantMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|