Brandon, Nicholas wrote:
> CREATE TABLE MyTable(start_col int,end_col int);
> INSERT INTO "MyTable" VALUES(-2, 2);
...
> sqlite> select * from MyTable join (select random(*) as number) as rand
> where start_col >= rand.number and end_col < rand.number;
Your logic is broken. As
>Nick,
>
>I just thought I should clarify my SQL. The select clause should be
>
>select * from MyTbale join...
>
>since the random number is already included in each row of the joined
>table.
>Dennis Cote
Thanks Dennis for the tip. Did you give it try?
I've tried it and its not selecting any
2 matches
Mail list logo