Results 1 to 2 of 2

Thread: how to skip lines while procedure executing by other user ?

  1. #1
    Join Date
    Sep 2002
    Posts
    159

    how to skip lines while procedure executing by other user ?

    Hi,
    how to skip lines while procedure executing by other user ?

    example

    create sp_test
    as
    --#1
    delete from x where a = 1
    --#2
    delete from x where a = 2
    --#3
    delete from x where a = 3

    --#4
    select * from x

    user A executing sp_test
    if user B executing sp_test at the same time run sp_test but skip #1; #3

    Thanks

    Alex

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    You'll need a table to track activity. When user A is executing it, log to the talbe that A is executing. Do the same for the others. Use conditional statements based on the data in the log table to determine which steps to run.

Posting Permissions

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