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 |
|
issammansour
Yak Posting Veteran
51 Posts |
Posted - 2007-08-20 : 14:58:45
|
| Hi,I Have the following "select statement" with "group by condition", I want the outgoing result for the query to be vno with (scamt <> sdamt) the example is as following:-select vno,vtype,tdate,sum(camt) as scamt,sum(damt) as sdamtfrom transactwhere year = 2007 group by vno,vtype,tdateHAVING (scamt <> sdamt)order by vnobut i have the following errorInvalid column name 'sdamt'. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-20 : 15:03:04
|
HAVING sum(camt) <> sum(damt) E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|