Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading uncommitted data
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Reading uncommitted data
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01426495
Message ID:
01426495
Views:
116
Hello

I have a Insert statement that creates records from a Sybase database into SQL Table(s), now one of those tables have an auto-reference, so, when a new record is inserted into it, an insert trigger fires and tries to locate it's father using a couple of scalar functions, the problem is that when I test the functions they work correctly, but when I do the real run they always return null as the parent, and I believe the reason is that the records have not yet being committed. I thought the solution would be simple enough using SET TRANSACTION ISOLATION LEVEL TO READ UNCOMMITTED, but this did not work, is there any way to do what I am trying? As a work around we are going to create a second procedure that will set all the parent of all the records after they have been inserted, but I thought that getting the parent in the insert trigger was neater.

Thanks
Hugo
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Next
Reply
Map
View

Click here to load this message in the networking platform