Re: [sqlite] application function value in sql where

2017-01-27 Thread R Smith
On 2017/01/26 8:29 PM, dspub...@freemail.hu wrote: On 2017/01/26 6:23 PM, dspub...@freemail.hu wrote: Thanks for responses, I have an other problem select * from (select row_number(name) as id,name from example order by name desc) t order by name In this query, the server why doesn't use

Re: [sqlite] application function value in sql where

2017-01-26 Thread dspublic
On 2017/01/26 6:23 PM, dspub...@freemail.hu wrote: Thanks for responses, I have an other problem select * from (select row_number(name) as id,name from example order by name desc) t order by name In this query, the server why doesn't use the nested "order by"? I want to numbering the inner

Re: [sqlite] application function value in sql where

2017-01-26 Thread David Raymond
me asc, id desc; -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of dspub...@freemail.hu Sent: Thursday, January 26, 2017 11:24 AM To: sqlite-users@mailinglists.sqlite.org Subject: Re: [sqlite] application function value in sql wher

Re: [sqlite] application function value in sql where

2017-01-26 Thread R Smith
On 2017/01/26 6:23 PM, dspub...@freemail.hu wrote: Thanks for responses, I have an other problem select * from (select row_number(name) as id,name from example order by name desc) t order by name In this query, the server why doesn't use the nested "order by"? I want to numbering the inner

Re: [sqlite] application function value in sql where

2017-01-26 Thread dspublic
On 2017/01/25 3:18 PM, Dominique Devienne wrote: On Wed, Jan 25, 2017 at 1:54 PM, Richard Hipp wrote: On 1/25/17, Richard Hipp wrote: On 1/25/17, dspub...@freemail.hu wrote: I get weird sql result with subselect too select * from

Re: [sqlite] application function value in sql where

2017-01-25 Thread R Smith
On 2017/01/25 3:18 PM, Dominique Devienne wrote: On Wed, Jan 25, 2017 at 1:54 PM, Richard Hipp wrote: On 1/25/17, Richard Hipp wrote: On 1/25/17, dspub...@freemail.hu wrote: I get weird sql result with subselect too select * from

Re: [sqlite] application function value in sql where

2017-01-25 Thread Dominique Devienne
On Wed, Jan 25, 2017 at 1:54 PM, Richard Hipp wrote: > On 1/25/17, Richard Hipp wrote: > > On 1/25/17, dspub...@freemail.hu wrote: > >> > >> I get weird sql result with subselect too > >> select * from (select row_number(name) as id,name

Re: [sqlite] application function value in sql where

2017-01-25 Thread Richard Hipp
On 1/25/17, Richard Hipp wrote: > On 1/25/17, dspub...@freemail.hu wrote: >> >> I get weird sql result with subselect too >> select * from (select row_number(name) as id,name from example ) t where >> id<=5 >> > > SQLite is invoking your row_number()

Re: [sqlite] application function value in sql where

2017-01-25 Thread Richard Hipp
On 1/25/17, dspub...@freemail.hu wrote: > > I get weird sql result with subselect too > select * from (select row_number(name) as id,name from example ) t where > id<=5 > SQLite is invoking your row_number() function twice for each row - once for the return value and a

[sqlite] application function value in sql where

2017-01-25 Thread dspublic
Hi Everyone, I would like to report a probably bug, what I found in sqlite (3.16.2) I want to make and use some application defined function (ADF). If I use ADF value in sql where expression, then the server result is incorrect. example data: