On 27 Aug 2015, at 6:41pm, Domingo Alvarez Duarte <sqlite-mail at 
dev.dadbiz.es> wrote:

> select random(), random() from blah order by random()  
> 
>    
> 
> Error ambiguous column "random()" near "order by". 

Thing is, that's not ambiguous.  I don't really care how SQLite implements it, 
but there is no excuse for generating such a ridiculous error message.

I would say that the above command should use the same number for all the 
occurences of 'random()' in each 'sqlite3_step()'.  But I also wouldn't mind it 
if it came up with three different values for random() in each 
'sqlite3_step()'.  On the other hand

SELECT random() AS aa, random() FROM blah ORDER BY aa

Should not generate three different random values.  It should be either one or 
two.

Simon.

Reply via email to