Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing results - Rajeevnandanmishra!!!!

Status
Not open for further replies.

ADW

Programmer
Jun 21, 2001
50
GB
Thanks for your help Rajeevnandanmishra - ur a great help. Next one for you. What a want to do is use the results from a sum function in a another. I'm having problems with the column:

declare @stock as float, @quant as float
set @stock = '300000'
select Transaction_type ,Transactions = count(all transaction_type),Total = sum( all movement_quantity ), datepart(wk, dated) AS 'week', datepart(yy, dated) AS 'YEAR' from st_history

where transaction_type not in
( 'TRAN','SCRP','BINT','SRET','DESP','RINV','SALE', 'ADJ')
and dated between '2000-07-01' and '2001-06-24'

group by datepart(wk, dated), datepart(yy, dated) , transaction_type
order by week, transaction_type

 
Hi ADW,
I am not getting what problem are you facing. And what do you mean by "want to do, is use the results from a sum function in a another."
Sorry ADW, but my english is not good, So it becomes somewhat difficult in understanding the problem. Please let use know what exactly is your problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top