• Thanks for the above input.

    Now I am stuck to write a Dynamic SQL which will inter update the Data in the cursor, as per teh data format needed.

    1. Formula is fetched into a Cursor form the Formula table.

    2. Decla one more cursore which will fetch the data from the SQL Prepared to fetch the pivot data.

    2. For loop is used to use the Formula data.

    3. Need to write a SLQ Query whcih will update the target Columns SAL, BON, COM based on the formula.