Posted - 06/26/2012 : 21:20:49
i have a store procedure which requires one input
now i want to execute this SP for all my prj_id from project
table...i had written like this....
declare @prj_id varchar(100) = ''
while @prj_id <(select max(prj_id) from project)
select @prj_id = min(prj_id) from project where prj_id > @prj_id
INSERT INTO SPITABLE
exec SP_MTR_TIMELINES_SPI_NEW '@prj_id'
now am getting an empty table ....
can some body suggest me whats the mistake....