cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

loop error,pls

ximen
Participant
0 Likes
4,072
declare @product_code char(10),@rowNR int,@Mrow int
set     i=1
select product_code,row_number() over(order by parent_id) as rowNR,parent_id into #FT_1 from product_code where parent_id='cp'
//select * from #ft_1
//select @mrow=max(rowNR) from #ft_1 
//select @mrow      
while  i<=29 LOOP
    select @product_code=product_code from #ft_1 where i=rownr
select @product_code
set i=i+1
end loop

select * from #t1

error loop alt text

View Entire Topic
justin_willey
Participant

Please post proper questions. If you don't know how to phrase them in English, just write them in your own language.

I fear you mis-understand the purposes of groups like these - they aren't here to do your work for you. If you have something you can't make work - explain what the problem is, what you have tried to do to solve it yourself, exactly what error you are getting and when, together with the version of the software, OS etc that you are using.

If you just post some code and say "error loop" - you are expecting someone else to set up a test environment, run your code etc just to find out what the problem is - not many people have the time or inclination to do that. You may do better to employ a consultant with the appropriate skills or use SAP's consulting services.

ximen
Participant
0 Likes

Please help me to correction ,I uploaded the pictures of the error thanks,So I'll pay attention next time under my ability of expression