Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: How to get SUM of Current day amount minus SUM of Previous day amount

    Hi frd's,

    here the tables

    In table t1

    columns : sys_id (char)= abc , abc

    product_code (char)=0.000 , 0.000

    ...

  • RE: How to get SUM of Current day amount minus SUM of Previous day amount

    Hi pieterlu,

    Here is the quary,

    SELECT t_facility.source_system as System_ID,

    DATEADD(s,0,DATEADD(dd, DATEDIFF(d,0,getdate()),0)) as Curreny_Reporting_Period,

    SUM(t_facility_valuation.amount) AS Current_Actual_currency,

    DATEADD(s,0,DATEADD(dd, DATEDIFF(d,0,getdate()-1),0)) as Previous_Reporting_Period,

    SUM(t_facility_valuation.amount) AS Previous_Actual_currency

    I need variance between Current_Actual_currency - Previous_Actual_currencyFROM t_facility_valuation

    INNER JOIN t_facility

    ON t_facility.facility_nr=t_facility_valuation.facility_nr

    Group BY t_facility.source_system,t_facility_valuation.amount,t_facility.last_modified

  • RE: How to get SUM of Current day amount minus SUM of Previous day amount

    Hi pieterlu,

    There is such column Amount in t2......Amount column is in only t1

    I need variance between Current and previous reporting day amount

  • RE: Error converting data type nvarchar to numeric.

    Really itz Very helpfull.....

    Tkq stewartc-708166

    In this same quary how can i get current reporting data field & previous repoorting date field........

    I made few changes like this :

    SELECT t_trn_loan.source_system as system_ID,t_trn_loan.char_cust_element4...

  • RE: Error converting data type nvarchar to numeric.

    I changed the quary like this...

    SELECT t_trn_loan.source_system,t_trn_loan.char_cust_element4,t_trn_loan.customer_nr,t_trn_loan_lqr_extension.outstanding_amount,

    DATEADD(s,0,DATEADD(dd, DATEDIFF(d,0,getdate()),0)) as Current_reporting_date

    FROM t_trn_loan

    INNER JOIN t_trn_loan_lqr_extension

    ON t_trn_loan.deal_id=t_trn_loan_lqr_extension.deal_id

    order BY t_trn_loan.source_system

    Now the problem is to calculate the Sum of outstanding_amount

  • RE: Error converting data type nvarchar to numeric.

    Tks for ur responce muthukkumaran Kaliyamoorthy

    but my requirement is to calculate the gross gl balance....

    Is there any possiable way 2 get by conveting plz update the quary and post...

Viewing 7 posts - 1 through 7 (of 7 total)