Viewing 8 posts - 406 through 413 (of 413 total)
Remi wrote:
Here's my thinking : Don't use cursors, ever. Then if you find a situation where a cursor is faster than a set based approach or there's no set...
July 8, 2005 at 12:29 am
It seems we have the same kind of problem - see Insert into problem with linked server.
What happens on your server...
July 7, 2005 at 8:18 am
You assumption is correct
I added a simple "select @minid" to the code above and constructed a similar cursor example. Then I ran the...
July 7, 2005 at 8:08 am
That might work, I haven't tried it. I was hoping that I could use linked server since it is more elegant and probably also faster.
July 7, 2005 at 7:49 am
Not sure I know that either, so I look forward to your reply...
July 7, 2005 at 7:16 am
If there is a unique id, then it is easy:
while (@id is not null)
select @id = min(id) from table where id > @id
and continue until you get null.
July 7, 2005 at 6:56 am
Did you run my example on your server? It runs on my server...
All I can say is that I have (mis)used the "insert into exec" feature (without the linked server)...
July 7, 2005 at 6:44 am
My first reply disappeared - maybe it will be back later...
It is possible to combine "insert into" and "exec" as follows (a simple example):
create table testtable (id int)
go
create proc testproc
as...
July 7, 2005 at 6:16 am
Viewing 8 posts - 406 through 413 (of 413 total)