I have an error in syntax @ in my code in postgreSQL database, but I don't know what could be wrong. Did I implemented the SQL loop code in rigth way? My SQL code:
DECLARE @Counter INT
SET @Counter=1
WHILE ( @Counter <= 1000)
BEGIN
INSERT INTO punkty (geog) SELECT ST_GeometryN(st_asText(ST_GeneratePoints(geom,1000)), @Counter) FROM panstwo
SET @Counter = @Counter + 1
END