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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 No column was specified for column 1...

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 why

select
(select Charge_No as CHARGE_ID, Pd_End_Date as SUB_PD_END_DT, sum(BCWS) as BUD_COST
from dbo.BCWS$
--where (Project LIKE '104104.001%') --AND (Pd_End_Date = '3/8/2008')
group by Charge_No, Pd_End_date)
into dbo.BCWS

Phillip

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_COST
into dbo.BCWS
from dbo.BCWS$
group by Charge_No, Pd_End_date

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -