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
 General SQL Server Forums
 New to SQL Server Programming
 i can not by one select recive 2 parametere

Author  Topic 

niyaz4872
Starting Member

41 Posts

Posted - 2012-08-01 : 00:19:20
SELECT @SumSold=SUM(FactorHdr_FinalPrice)
FROM SAL_FactorHdr
WHERE (RecordType = '5)
SELECT @ActBes=SUM(RecordMoney)
FROM vw_PayS_PersonInvoice
WHERE (RecordType = '8')

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-08-01 : 00:41:18
[code]
SELECT @SumSold = (SELECT SUM(FactorHdr_FinalPrice) FROM SAL_FactorHdr WHERE (RecordType = '5)),
@ActBes = (SELECT SUM(RecordMoney) FROM vw_PayS_PersonInvoice WHERE (RecordType = '8'))
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

niyaz4872
Starting Member

41 Posts

Posted - 2012-08-01 : 04:18:38
i need group by and where in select in other select
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-08-01 : 04:39:04
quote:
Originally posted by niyaz4872

i need group by and where in select in other select



Sorry, don't quite understand what do you mean by that. Can you illustrate with an example ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-08-01 : 09:34:53
quote:
Originally posted by niyaz4872

i need group by and where in select in other select


whats need for group by here?
is this an assignment question?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -