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 |
philliplee
Starting Member
1 Post |
Posted - 2008-06-19 : 14:51:43
|
I created the below script to select data from one table, sum values, and insert into another table. But I get the "No column was specified for column 1" error. I can't figure out whyselect (select Charge_No as CHARGE_ID, Pd_End_Date as SUB_PD_END_DT, sum(BCWS) as BUD_COSTfrom dbo.BCWS$--where (Project LIKE '104104.001%') --AND (Pd_End_Date = '3/8/2008')group by Charge_No, Pd_End_date)into dbo.BCWSPhillip |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-06-19 : 14:55:53
|
select Charge_No as CHARGE_ID, Pd_End_Date as SUB_PD_END_DT, sum(BCWS) as BUD_COSTinto dbo.BCWSfrom dbo.BCWS$group by Charge_No, Pd_End_dateTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
|
|