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 |
|
niyaz4872
Starting Member
41 Posts |
Posted - 2012-08-01 : 05:35:28
|
| SELECT @ActBes=SUM(RecordMoney)FROM vw_PayS_PersonInvoiceWHERE (RecordType = '8') AND (Company_ID = @Com_ID) AND (Anbar_ID = @Anb_ID ) AND (Tafzili_ID = @Ctm_ID) AND (OperationDate >= @FromDate) AND (OperationDate <= @ToDate)select (isnull( @PayMandehBed,0) - isnull(@PayMandehBes,0)+isnull(@SumSold,0)) as Mandeh, Cast(0 as decimal(18,3)) AS SumBes,Cast(0 as decimal(18,3)) AS SumBed,Cast(0 as decimal(18,3)) AS CreditFROM SAl_Customers INNER JOIN SAL_FactorHdr ON SAl_Customers.Ctm_Id = SAL_FactorHdr.FactorHdr_Ctm_ID INNER JOIN COM_Company ON SAL_FactorHdr.FactorHdr_Com_ID = COM_Company.COM_IDWHERE (RecordType = '5') and(SAL_FactorHdr.FactorHdr_Com_ID = @Com_ID) AND (SAL_FactorHdr.FactorHdr_Date >= @FromDate) AND (SAL_FactorHdr.FactorHdr_Date <= @ToDate) AND (SAL_FactorHdr.FactorHdr_ANB_ID = @ANB_ID) AND (SAL_FactorHdr.FactorHdr_Ctm_ID = @Ctm_ID)GROUP BY SAL_FactorHdr.FactorHdr_Ctm_ID, SAl_Customers.Ctm_Name |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-08-01 : 07:00:33
|
I really would like to help you in solving your problem but now I am going to be a bit upset because you are ignoring all responses...So I better stop posting in your threads before I am going to flame! No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|