[sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
Hi all According to the documentation for the WITH clause, the recursive table must appear exactly once in the FROM clause of the recursive-select and must not appear anywhere else in either the initial-select or the recursive-select, including subqueries. I am trying to do the following -

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
From: Frank Millman fr...@chagford.com WITH RECURSIVE temp AS ( [initial-select UNION ALL recursive-select] ) SELECT * FROM temp UNION * FROM temp Sorry, I meant SELECT * FROM temp UNION SELECT * FROM temp Frank ___ sqlite-users mailing list

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Richard Hipp
On Mon, Aug 25, 2014 at 6:10 AM, Frank Millman fr...@chagford.com wrote: I am trying to do the following - WITH RECURSIVE temp AS ( [initial-select UNION ALL recursive-select] ) SELECT * FROM temp UNION * FROM temp I get the error 'no such table: temp'. Hard to test without the exact

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-25 Thread 王庆刚
hi I modified the code sqlite3.c according to you method, as follow http://fossil-scm.org/index.html/vpatch?from=dd5743a8239d1ce9to=b68f65bb69a098a1 or http://fossil-scm.org/index.html/info/c2d4bd7365 I test you method in workbench3.2(vxworks6.8) , the build macros which I used

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Keith Medcalf
Looking backwards on the list one finds that: There was a bug regarding compound SELECT statements that use CTEs discovered shortly after 3.8.3 was released: http://www.sqlite.org/src/info/67bfd59d9087a987 http://www.sqlite.org/src/info/31a19d11b97088296a The fix appeared in 3.8.4. If

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
From: Frank Millman fr...@chagford.comThanks for the reply, Richard. WITH RECURSIVE temp(x) AS ( SELECT 1 UNION ALL SELECT x+1 FROM temp WHERE x5 ) SELECT x FROM temp UNION SELECT x+5 FROM temp; And did indeed get integers 1 through 10 as an answer. I get the same error as before - 'no

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
- Original Message - From: Keith Medcalf kmedc...@dessus.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Monday, August 25, 2014 2:28 PM Subject: Re: [sqlite] Problem with recursive CTE Looking backwards on the list one finds that: There was a bug

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
- Original Message - From: Frank Millman fr...@chagford.com To: sqlite-users@sqlite.org Sent: Monday, August 25, 2014 2:32 PM Subject: Re: [sqlite] Problem with recursive CTE Could it be a version problem? I am using the version bundled with Python3.4.1 for Windows.

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Alek Paunov
On 25.08.2014 15:42, Frank Millman wrote: I have upgraded to version 3.8.6, and I can confirm that it now works. Thanks very much, Richard and Keith Now I have to figure out how to get Python to use the upgraded version, but that is one for the python mailing list. You may consider upgrade

[sqlite] SQLite Database Browser v3.3.0 released

2014-08-25 Thread justin
Hi all, SQLite Database Browser v3.3.0 has been released. :) https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/v3.3.0 This has several bug fixes in it around table parsing, which fixes several it crashes when I open my db type problems. (Oops) ;) Plus a lot of general

Re: [sqlite] HELP sqlite3 used in vxworks has someproblem?

2014-08-25 Thread Andy Ling
That file name in the first error doesn't look like a vxWorks file. What devices have you got mounted. You need to specify a file path that points to one of the vxWorks file IO devices. By just specifying the file name in your second example it is being created in the current directory. The

[sqlite] Window functions?

2014-08-25 Thread forkandwait
Has anyone thought in some detail about what it would it take to add window functions to SQLite? http://www.postgresql.org/docs/9.4/static/tutorial-window.html For data analysis shops like us (think SAS + baroquely complex Excel + lots of graphs), SQLite with window functions would be immense.

Re: [sqlite] Window functions?

2014-08-25 Thread Simon Slavin
On 25 Aug 2014, at 4:43pm, forkandwait webb.spra...@gmail.com wrote: Has anyone thought in some detail about what it would it take to add window functions to SQLite? Would you care to explain what advantages Window functions would give us that VIEWs and sub-SELECTs don't give us ? I'm not

Re: [sqlite] SQLite Database Browser v3.3.0 released

2014-08-25 Thread Richard Hipp
Thank you for creating this project. I downloaded a copy. It seems very nice. *Now, Please Change The Name!!!* SQLite is a trademark. You are welcomed and encouraged to use the code for SQLite, but not the name SQLite. This is not just a legal exercise. A project like your SQLite Database

Re: [sqlite] Window functions?

2014-08-25 Thread Richard Hipp
On Mon, Aug 25, 2014 at 11:43 AM, forkandwait webb.spra...@gmail.com wrote: I am not promising anything, but I would be interested in a sketch of it might take a hacker to add these to SQLite -- what files need to be touched, what sections of the lemon parser, etc. You used the word

Re: [sqlite] Window functions?

2014-08-25 Thread forkandwait
Simon Slavin slavins@... writes: Would you care to explain what advantages Window functions would give us that VIEWs and sub-SELECTs don't give us ? I'm not being contrary, I'd like to know. I have never compared lines of code between the various approaches, but window functions make it

Re: [sqlite] Window functions?

2014-08-25 Thread forkandwait
You used the word immense which I like - it is an apt description of the knowledge and effort needed to add windowing functions to SQLite (and probably any other database engine for that matter). Hehe. I would be interested in any of your specific thoughts on the immensity of it. I can

Re: [sqlite] Window functions?

2014-08-25 Thread Richard Hipp
On Mon, Aug 25, 2014 at 1:21 PM, forkandwait webb.spra...@gmail.com wrote: You used the word immense which I like - it is an apt description of the knowledge and effort needed to add windowing functions to SQLite (and probably any other database engine for that matter). Hehe. I would be

Re: [sqlite] Window functions?

2014-08-25 Thread Petite Abeille
On Aug 25, 2014, at 7:12 PM, Richard Hipp d...@sqlite.org wrote: You used the word immense which I like - it is an apt description of the knowledge and effort needed to add windowing functions to SQLite (and probably any other database engine for that matter). True. But what a quantum leap

Re: [sqlite] Window functions?

2014-08-25 Thread Petite Abeille
On Aug 25, 2014, at 7:04 PM, Simon Slavin slav...@bigfraud.org wrote: Would you care to explain what advantages Window functions would give us that VIEWs and sub-SELECTs don't give us ? I'm not being contrary, I'd like to know. Analytics are to sub-selects like cruise missile are to

Re: [sqlite] Window functions?

2014-08-25 Thread Stephan Beal
On Mon, Aug 25, 2014 at 9:17 PM, Petite Abeille petite.abei...@gmail.com wrote: True. But what a quantum leap that would be. Like moving from the wheelbarrow to the jet engine. For the small percentage of users who need it (or would even know how to apply it). i've been following this list

Re: [sqlite] Window functions?

2014-08-25 Thread Petite Abeille
On Aug 25, 2014, at 9:25 PM, Stephan Beal sgb...@googlemail.com wrote: For the small percentage of users who need it (or would even know how to apply it). i've been following this list since 2006 or 2007 and i recall this topic having come up only a small handful of times, which implies that

Re: [sqlite] Window functions?

2014-08-25 Thread Nelson, Erik - 2
Stephan Beal wrote on Monday, August 25, 2014 3:26 PM For the small percentage of users who need it (or would even know how to apply it). i've been following this list since 2006 or 2007 and i recall this topic having come up only a small handful of times, which implies that only a small

Re: [sqlite] Window functions?

2014-08-25 Thread forkandwait
Stephan Beal sgbeal@... writes: For the small percentage of users who need it (or would even know how to apply it). i've been following this list since 2006 or 2007 and i recall this topic having come up only a small handful of times, which implies that only a small minority of users feels

Re: [sqlite] Window functions?

2014-08-25 Thread Petite Abeille
On Aug 25, 2014, at 7:18 PM, forkandwait webb.spra...@gmail.com wrote: Compare the two SQL examples between Approach 2 and Approach 3 in the linked page: http://hashrocket.com/blog/posts/sql-window-functions Couple more: There was SQL before window functions and SQL after window functions

Re: [sqlite] Window functions?

2014-08-25 Thread big stone
Hi, For one of the few wishing it : - I can understand when Richard writes it's very complex to implement in full, as I can imagine tricky requests with it, - but would a basic subset, like the one described here in March '14 (

Re: [sqlite] Window functions?

2014-08-25 Thread forkandwait
big stone stonebig34@... writes: - but would a basic subset, like the one described here in March '14 ( http://sqlite.org:8080/cgi-bin/mailman/private/sqlite-users/2014-March/051635.html For non-subscribers to read: http://thread.gmane.org/gmane.comp.db.sqlite.general/86702 ) : . be

Re: [sqlite] Window functions?

2014-08-25 Thread Petite Abeille
On Aug 25, 2014, at 10:20 PM, forkandwait webb.spra...@gmail.com wrote: I would be interested to hear what parts of the full window function spec are not covered by the example, if someone can describe it easily. Well, the exact implementation varies from implementation to implementation,

Re: [sqlite] Window functions?

2014-08-25 Thread Richard Hipp
On Mon, Aug 25, 2014 at 4:20 PM, forkandwait webb.spra...@gmail.com wrote: I would be interested to hear what parts of the full window function spec are not covered by the example, if someone can describe it easily. SELECT employee_name, employee_id, salary, rank() OVER(PARTITION BY

Re: [sqlite] Window functions?

2014-08-25 Thread Stephan Beal
On Mon, Aug 25, 2014 at 9:43 PM, forkandwait webb.spra...@gmail.com wrote: Stephan Beal sgbeal@... writes: For the small percentage of users who need it (or would even know how to apply it). i've been following this list since 2006 or 2007 and i recall this topic having come up only a

Re: [sqlite] Window functions?

2014-08-25 Thread big stone
Hi Stephan, lite, is not a mathematic definition, and is increasing over time. (at least 5% per year in Sqlite code size, by 30% in smartphone capabilities ) == What was heavy in 2003 will become lite one day. ___ sqlite-users mailing list

Re: [sqlite] Edinburgh Buses

2014-08-25 Thread Errol Emden
Goodly Folks, I am confounded by the required solution to the following problem: Find the routes involving two buses that can go from Craiglockhart to Sighthill. Show the bus no. and company for the first bus, the name of the stop for the transfer, and the bus no. and company for the second

Re: [sqlite] Edinburgh Buses

2014-08-25 Thread Igor Tandetnik
On 8/25/2014 7:52 PM, Errol Emden wrote: FROM stops astop JOIN stops bstop ON bstop.name='Craiglockhart' OR bstop.name='Sighthill' Why are you checking two names against stop B, and none against stop A? You also need to check that route A and route B actually connect - that the end stop of

Re: [sqlite] Window functions?

2014-08-25 Thread Keith Medcalf
select id, category_id, name, min(price) as minprice from cat_pictures group by category_id; Done. And no need for any windowing functions ... -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of forkandwait Sent: Monday,

Re: [sqlite] Edinburgh Buses

2014-08-25 Thread Simon Slavin
On 26 Aug 2014, at 12:52am, Errol Emden eem...@hotmail.com wrote: Goodly Folks, I am confounded by the required solution to the following problem: Find the routes involving two buses that can go from Craiglockhart to Sighthill. I think it's time we stopped doing people's homework for