Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
GustiX
Starting Member
28 Posts |
Posted - 2012-07-14 : 20:13:52
|
HiI have a stored procedure that has a cursor with a union query statement, something like:declare DEMO cursor for select col1 from table1 union select col2 from table2fetch next ... and so onIt appears that sometimes when the procedure is runI only get half of the expected records (only from table2)Is it possible if there is a deadlock (or something blockingthe select statement from table1) that a union query would onlygive the results from the bottom half of a union query?I would think that if something is blocking the top halfof the union query that it would just fail... ??? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-14 : 22:51:27
|
hmm...not something i've seen so far. try this variant and see if you can reproduce same errordeclare DEMO cursor forselect colfrom(select col1 as col from table1unionselect col2 from table2)tfetch next ... ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|