Link to home
Start Free TrialLog in
Avatar of ExpertKapur
ExpertKapur

asked on

Calculating taxes based on Product Code

Hi,
I have a SSIS package which calls a stored procedure to calculate taxes for a product. Now I need to change something. Whenever the product code starts with 'P' calculate 10% and 14 % tax for that product in pricing detail table. Whenever product code starts withj 'F' calculate 16% tax for that product. So in previous case there are two records created and in the later case there is just one record cretaed in the pricing detail table. How can I do it fast in my SSIS package or stored proc. used to create records in pricing detail table.?
Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image

Would be easier within the SP I think.  Can you post your current SP?
Avatar of ExpertKapur
ExpertKapur

ASKER

stored pro. is just inserting values in a table.

      INSERT INTO PricingDetail
              ( ProductID ,
               Year ,
                Season ,
                ProductCode ,
                )
      SELECT        @ProductID,
                  2011,
                     'S',
                     @ProductCode
         FROM Product

it's a long stored procedure but above is what basically it does. Now I ca get the Product Type by calling another stored proc. in SSIS now based on the product Type it will create two records if the product type is 'P' with different taxes and just one record if product type is 'F' with 16% tax.


ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial