>
>
> Regarding:
>
> WITH RECURSIVE
> x(y) AS (VALUES(1) UNION ALL SELECT y+1 FROM x WHERE y<10000000)
> INSERT INTO player SELECT printf('Player%d',i), i, random(), NULL FROM x;
>
>
> If anyone's "playing along at home" I wondered if instead of:
... printf('Player%d',i), i, random(),...
what might have been intended was
... printf('Player%07d',y), random(),...
(i.e., with the "i" replaced with "y" in the printf, the additional "i"
removed, and the printf format allowing the final value of 'Player1000000'.)
So that the modified sql is:
WITH RECURSIVE
x(y) AS (VALUES(1) UNION ALL SELECT y+1 FROM x WHERE y<100000)
INSERT INTO player SELECT printf('Player%07d',y), random(), NULL FROM x;
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users