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