General discussion

  • Creator
    Topic
  • #2177137

    Using SQL Triggers to update Tables.

    Locked

    by sunney ·

    I have a table called SALE, which is populated using BCP. The SALE table is missing the Retail Price since it is not in the BCPed file and needs to be read in from another table.

    The SALE table has an insert trigger that it uses to populate MONTH_SALE. My question is that can I use this trigger to read the Retail Price in and update the SALE table and simultaneously update the MONTH_SALE table also. Please advise. I thank you for your efforts.

All Comments

  • Author
    Replies
    • #3332110

      Reply To: Using SQL Triggers to update Tables.

      by ahar ·

      In reply to Using SQL Triggers to update Tables.

      yes, at least with a function

    • #3174905

      Reply To: Using SQL Triggers to update Tables.

      by amoljpatil ·

      In reply to Using SQL Triggers to update Tables.

      yeap, this is possible. Your insert trigger, u r populating the MONTH_SALE table, after tht you can read the retail price from and write the update sql for SALE & MONTH_SALE table.

Viewing 1 reply thread