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 |
|
eurob
Posting Yak Master
100 Posts |
Posted - 2005-08-12 : 14:02:17
|
| When I do: select sum(x) as mysum, I would expect to see the 'mysum' in header of the column.Anyone knows how to achieve that ?Thanks,robertrobert |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-12 : 14:09:38
|
| Yes SUM(x) AS MySum works. Did you try it out in Query Analyzer or is this from your application? If from your application, then that's where the problem is as what you have posted works. Here's a sample to try out in Query Analyzer:SELECT SUM(dbid) AS SUMDBIDFROM master.dbo.sysdatabasesTara |
 |
|
|
eurob
Posting Yak Master
100 Posts |
Posted - 2005-08-12 : 14:14:53
|
| Thank you, I realize I asked the wrong question.I needed it for a subquery.robert |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-12 : 14:37:14
|
| If it's for a subquery, please post the query so that we can help you better.Tara |
 |
|
|
eurob
Posting Yak Master
100 Posts |
Posted - 2005-08-12 : 14:39:53
|
| http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53692robert |
 |
|
|
|
|
|