Hi All
I need to write a stored procedure in SQL that selects data from 2 tables into 1 table, the resulting table will get 3 new calculated columns , so the stored proc must select the data from the 2 tables and at the same time add 3 new columns as calculated fields. There is a trick part in the calculation as an example , the script should do something like this:
IF 'item charges'=0, then sales amount
IF 'item charges' = 'Promo' or 'rebate' or 'Storage' then sales amount.
the 3 new calculated column names will be Gross Revenue , Export Cost and Sales Support
hope anyone can assist
thanks