Cursors are evil!!!!
However, to be able to fully answer your question, we need to see your
stored proc/schema or even the results of a showplan.
I have used DTS/stored procs to import all sorts of data and have
never once had to resort to cursors (maybe I have just been lucky).
Generally speaking, I normally just do a select statement from the
source table which is used as input to the destination and doing any
casting/coercion along the way.
eg
create proc finky as
insert into
source
(a
,b
,c
)
select
a as char(2)
,IsNull(b, '')
,c
from
destination
sa*********@hotmail.com (Samir Pandey) wrote in message news:<33**************************@posting.google. com>...
I have a table which contains approx 3,00,000 records. I need to
import this data into another table by executing a stored procedure.
This stored procedure accepts the values from the table as params. My
current solution is reading the table in cursor and executing the
stored procedure. This takes tooooooo long. approx 5-6 hrs. I need to
make it better.
Can anyone help ?
Samir