Skip to Content
0
Former Member
Apr 24, 2009 at 12:16 PM

Row Total Query

32 Views

Hi All,

I want to calculate the total expense amount from the Service call screen. I have one UDF U_amt and I want to have total expense amount in it. I am using following stored procedure,

 IF @transaction_type = 'U' AND @Object_type = '191'
BEGIN
UPDATE OSCL SET 
U_amt = (SELECT SUM(T2.[DocTotal]) FROM OSCL T0 , SCL4 T1, OINV T2 WHERE T1.[SrcvCallID] =  T0.[callID] and  T2.[DocNum] =  T1.[DocNumber] and DOCENTRY = @list_of_cols_val_tab_del)

END 

But its not working properly. It shows amount but the amount is not correct. Can anybody help me out with this.

Regards,

Siddiq