I have this error that has to do with declare
, and I tried many ways, but I can not fix it:
declare '@i' int
set @i = 1
while @i <=10 -- 1.000.000 filas
begin
insert into neptuno.varchar_variable_dcha
select top (100000)
replace (cast(NEWID() as varchar(100)), '-','')
+ REPLICATE ('a',200-32)
from pedidos
cross join detalles_de_pedidos
print cast (@i as varchar(100))
set@i = @i + 1
end