Results 1 to 2 of 2


  1. #1
    Join Date
    Dec 2003

    Question Unanswered: SQL TRiGGER

    I need to write a sql trigger that exec a store procedure and this SP is no output. It just select some records from dataabse.
    How can i retrieve this record in my trigger by calling this SP?

  2. #2
    Join Date
    Jul 2003
    San Antonio, TX
    Triggers do not allow DDL, but you can trick it:

    --the statement below will create a table with required structure.
    --modify the field list to match the output from the procedure.
    select f1 = cast(null as int), f2 = cast(null as char(1)) into #tmp where 1=2
    insert #tmp exec sp_my_stored_procedure @param1, @param2
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts