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 |
velvettiger
Posting Yak Master
115 Posts |
Posted - 2008-04-23 : 18:46:15
|
Hi All,I was just wondering if any one can tell me if it is possible to do a comparison on a column that is not in the database but a temporary one. I am using sql sever 2000. E.g[CODE]SELECT CardNumber ,sum(DailyTransactionValue)TotalSpendfrom Customer where TotalSpend < 399[/CODE] |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-23 : 18:53:27
|
SELECT CardNumber, TotalSpendFROM (SELECT CardNumber,sum(DailyTransactionValue) AS TotalSpend from Customer group by CardNumber) tWHERE TotalSpend < 399Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|