Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL to transpose data using the Formula from a Different table. Expand / Collapse
Author
Message
Posted Monday, April 8, 2013 3:34 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, March 6, 2014 11:47 PM
Points: 86, Visits: 214
Hi Team,

I have a Complex requirement.

Source:
--------
NAME PAYMENT_TYPE PAYMENT
SUDHIR SAL 30.3
SUDHIR ADV 10.3
SUDHIR ALL_1 10
SUDHIR ALL_2 10
SUDHIR ALL_3 10
MADHAV SAL 34
MADHAV ALL_1 24
MADHAV BONUS 10

Formula:
--------
TGT_PAYMENT_TYPE PAYMENT_FORMULA
SAL SAL-ADV
COMM ALL_1+ALL_2-ALL_3
BONUS SAL * 1.1

Target Table:
------------
NAME SAL BONUS COMM
SUDHIR 20 0 10
MADHAV 34 10 24


Please need help to code SQL Query / Package which will take the Formula on from the table Formula and apply on Source before pushing it to target.

Thanks & Regards,
Sudhir Nune.
Post #1439720
Posted Monday, April 8, 2013 8:28 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, March 6, 2014 11:47 PM
Points: 86, Visits: 214
Hi All,

Please need some help or clues...!
Post #1439868
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse