I think you have to use cursors for this. Lets wait for other
suggestions.
Regards
Thread
alter proc sppro
as
DECLARE @pc char(11)
Declare cur cursor for select * from t1 --put ur select query here
OPEN cur
FETCH NEXT FROM cur INTO @pc
WHILE @@FETCH_STATUS = 0
BEGIN
--put ur if loop logic here to insert
insert into t2 values(@pc)
FETCH NEXT FROM cur INTO @pc
END
CLOSE cur
DEALLOCATE cur
Go
i think am correct...
Is there any other simple way to do this????
Regards,
Satheesh
Regards
Thread
alter proc spprotemptable
as
Select col into temp# from t1 --put ur select query here
insert into t2 select * from temp# --put ur if loop logic here to
insert
drop table temp#
GO
Regards,
Satheesh