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 |
|
issam
Starting Member
30 Posts |
Posted - 2007-09-07 : 06:46:46
|
| Hi,I have the following statement with multi-part identifier error :-SELECT #t.vno,transact.vdesc,transact.acctno,transact.camt,transact.damt,transact.ccamt,transact.cdamt into #main FROM transact,( SELECT VNO,VTYPE,TDATE,SUM(CAMT) AS SCAMT,SUM(DAMT) AS SDAMT FROM TRANSACT WHERE YEAR = 2007 and batchno = 5 GROUP BY VNO,VTYPE,TDATE having sum(camt) <> sum(damt) )as #t WHERE (transact.YEAR = 2007)thanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-09-07 : 06:51:39
|
what is the error message ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-09-07 : 06:55:30
|
| "as #t"You can't have a '#' in the Alias, just use an alphanumeric nameKristen |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-09-07 : 06:58:13
|
Good catch. What sharp eyes you have.  KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
Kristen
Test
22859 Posts |
|
|
|
|
|
|
|