I am trying to make some computations on some data in a SQL table and extract it out as a text file. I have the SQL query in the following format.Select Col1, Sum(Col2) Col2_Sum, Sum(col3) Col3_SumInto #tempFrom TableAGroup by Col1Select * from #tempDrop table #temp
This executes fine when I run it in Query Analyzer but throws an error pointing at the 'group by' when I place it in the DTS. But if I remove the #Temp table from the query and have it as ...Select Col1, Sum(Col2) Col2_Sum, Sum(col3) Col3_SumFrom TableAGroup by Col1
...it executes fine.Any help will be appreciated. and please note that the computations is much more complicated and hence I will very likely need the #temp table.Thank You.PKS.