Re: [sqlite] Can you use random(*) to retrieve a pseudo random r owfrom 3.2.3?

2005-08-23 Thread Jakob Hirsch
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

RE: [sqlite] Can you use random(*) to retrieve a pseudo random r owfrom 3.2.3?

2005-08-23 Thread Brandon, Nicholas
>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