Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011
    Posts
    2

    Question Unanswered: Issue with Isolation Level 0 and tempoary tables

    Hi,

    I have table in sybase which is named as test ( which also has a unique index on it)

    I am trying to do the below in 1st Session

    Begin tran
    update test
    set......

    ( now as I am not doing a commit or rollback so there is a lock)

    in the second session:


    ************ the below works fine******************
    set transaction isolation level 0

    select * from test


    -------------------------------------------

    but if I use a temp table then it gets hung up until I commit/rollback the first session

    select *
    into #temp
    from test


    Is there any workaround for setting isolation level 0 and getting dirty data in a temp table?

  2. #2
    Join Date
    May 2011
    Posts
    2

    Smile

    I have figured that using a cursor helps in this case.

    First create a cursor for a select (at isolation read uncommitted)

    and then fetch the data of the cursor in a temp table...
    in this way we would be able to catch the uncommitted data in a temp table.

Posting Permissions

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