Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2004

    Question Unanswered: Get last identity value


    Can I get the last table identity value from DTS Step?
    I log DTS package execution into log table and want to mark package completation time at the same table.
    At the first step I use Execute SQL Task with statements:

    DECLARE @oper_id int

    INSERT INTO t_data_oper_log (data_kind, start_time)
    VALUES ('Q', getdate())

    SET @oper_id = @@identity

    SELECT @oper_id as operid

    At the same task I'm trying to read "operid" with Parameters.../Output parameters into Global Variable to use it within last task to update completation time.
    But GV value is not updated.

    What's wrong?

    Any help will be appreciated.
    Last edited by awson; 12-01-05 at 12:15.

Posting Permissions

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