Viewing 15 posts - 13,081 through 13,095 (of 15,381 total)
thayes 89705 (2/3/2012)
0
1
2
1
But, maybe the ROLLBACK here would actually force all linked transactions to be rolled back and the last @@TRANCOUNT would return 0? ...
February 6, 2012 at 7:29 am
Here is a greatly simplified skeleton of what you described you are running.
create procedure proc1
as begin
begin transaction
select 'Proc 1'
rollback transaction
end
go
create procedure proc2
as begin
begin transaction
select 'Proc 2'
rollback transaction
end
go
begin try
begin transaction
exec Proc1;
exec...
February 3, 2012 at 3:16 pm
My guess is that either proc1 or proc2 encountered an exception an did a rollback, when returning to the main calling block there would be no transactions.
Take a look at...
February 3, 2012 at 3:05 pm
Well since this is relatively quick you could just put it inside a transaction. At least that should prevent getting duplicates, unless there are dirty reads.
February 3, 2012 at 11:49 am
chris.r.armstrong (2/3/2012)
Michael, does...
February 3, 2012 at 10:31 am
Well your subquery by itself is not valid.
(select isNull(max(UserSequence), 0)
From where? What is UserSequence?
It is hard to tell exactly what you are trying to do but you probably need...
February 3, 2012 at 10:28 am
So you want to delete sales records if they belong to a contact that has a duplicate first name? Wouldn't you want to update the sales record?
February 3, 2012 at 9:07 am
I still think you are creating a lot of unneeded work but I of course have no idea about your business requirements. Probably the easiest way to get that in...
February 3, 2012 at 9:01 am
Cadavre (2/3/2012)
Sean Lange (2/3/2012)
February 3, 2012 at 8:56 am
Are you trying to build an update sproc that will only update the columns that are supplied? That seems like an awful lot of extra overhead and processing. Given what...
February 3, 2012 at 8:51 am
Given what you need for output that is about all you can do. I just wanted to make sure you understand how much data can be pulled back from a...
February 2, 2012 at 2:34 pm
ssc_san (2/2/2012)
I have tried something like this:
select program, pstatus, form from
(select * ,
ROW_NUMBER() over (partition by program order by len(form)) as RowNum
from #pt
group by program, pstatus, form)...
February 2, 2012 at 2:27 pm
Dave Brooking (2/2/2012)
Is the group by clause needed in this case?
I tend to use CTEs (and probably overuse them). Is there any advantage to your approach (I think it...
February 2, 2012 at 2:06 pm
svakka (2/2/2012)
Thank you so much jcb. This is exactly what I need. I'm curious on how the performance is for cross joins
The join itself it so much an issue on...
February 2, 2012 at 1:49 pm
Viewing 15 posts - 13,081 through 13,095 (of 15,381 total)