Re: [sqlite] Support for millisecond

2015-01-08 Thread Petite Abeille
On Jan 8, 2015, at 7:21 PM, Lance Shipman lship...@esri.com wrote: Can SQLite support millisecond precision in date time data? I looking at doc I think so, but it's not clear. There is no 'date time’ data type in SQLite. Feel free to store your time data as either text or number. To

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Petite Abeille
On Jan 7, 2015, at 11:35 PM, Paul Sanderson sandersonforens...@gmail.com wrote: Hmm - why can't I get that to work when the hex value is stored in a column, i.e. Most likely your data is stored as text, e.g.: with DataSet as ( select '0x49962d2' as value union all select

Re: [sqlite] using a hex integer as input to DateTime

2015-01-07 Thread Petite Abeille
On Jan 7, 2015, at 11:08 PM, Paul Sanderson sandersonforens...@gmail.com wrote: Is this possible? With a contemporary version of SQLite, yes: sqlite select DateTime(77161170, 'unixepoch'); 1972-06-12 01:39:30 sqlite select DateTime(0x49962d2, 'unixepoch'); 1972-06-12 01:39:30

Re: [sqlite] Whish List for 2015

2014-12-21 Thread Petite Abeille
On Dec 21, 2014, at 10:47 AM, big stone stonebi...@gmail.com wrote: - a minimal subset of analytic functions + MERGE! Yeah! Happy Holidays! ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Search for text in all tables

2014-12-04 Thread Petite Abeille
On Dec 4, 2014, at 10:26 PM, Roger Binns rog...@rogerbinns.com wrote: That will only work under the simplest of cases. Simplicity first and foremost. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Possible automatic ON CONFLICT resolution via DEFAULTS

2014-10-08 Thread Petite Abeille
On Oct 8, 2014, at 6:14 AM, Stephen Chrzanowski pontia...@gmail.com wrote: When adding a NULL value to a table that has the NOT NULL flag set on that field, instead of raising an exception, if the field definition were to have the word USE between ON CONFLICT and DEFAULT in its declaration,

Re: [sqlite] Possible automatic ON CONFLICT resolution via DEFAULTS

2014-10-08 Thread Petite Abeille
On Oct 8, 2014, at 8:51 PM, Stephen Chrzanowski pontia...@gmail.com wrote: If the field def'n were to be changed to [ col2 NUMBER DEFAULT ON NULL 0 ] and then when I insert/update something that becomes NULL and the result becomes 0 for that field, then yeah, bingo. Yep, that’s exactly what

Re: [sqlite] An order by problem, maybe a bug?

2014-09-20 Thread Petite Abeille
On Sep 20, 2014, at 9:21 PM, Simon Slavin slav...@bigfraud.org wrote: Anyone who worked for a big company these days and created such a database should get called in and told to do it again properly. Along these same lines: Your last name contains invalid characters

Re: [sqlite] Create join and add unique column

2014-09-16 Thread Petite Abeille
On Sep 16, 2014, at 8:15 PM, RSmith rsm...@rsweb.co.za wrote: could you show how to achieve this in SQL via the ranking method you linked Well, ranking is the same as numbering, no? So, for example: with NameSet as ( select 1 as id, 'paul' as name union all select 2 as id, 'helen' as

Re: [sqlite] SET (x,y) = (x1,y1)?

2014-09-15 Thread Petite Abeille
On Sep 15, 2014, at 7:08 PM, Hick Gunter h...@scigames.at wrote: Maybe you can reformulate the query to fit INSERT OR UPDATE INTO t SELECT t.a,t.b,...,s.x,s.y FROM t, s … There is no such a thing as 'INSERT OR UPDATE’ in SQLite. There is a ‘REPLACE’, but it’s definitively not the same as

Re: [sqlite] BUG: Aggregate functions in subqueries

2014-09-15 Thread Petite Abeille
On Sep 15, 2014, at 4:48 PM, Richard Hipp d...@sqlite.org wrote: On Sun, Sep 14, 2014 at 12:18 AM, Lea Verou l...@verou.me wrote: Per the 3.7.11 changelog [1], queries of the form SELECT max(x), y FROM table return the value of y from the same row that contains the maximum x value.

Re: [sqlite] XML into sqlite

2014-09-11 Thread Petite Abeille
On Sep 11, 2014, at 5:45 PM, Carlos A. Gorricho cgorri...@heptagongroup.co wrote: Next step is to venture into XML - sqlite integration...both ways. Considering you are on a *nix system, you may find Dan Egnor’s xml2 set of command line utilities of interest:

Re: [sqlite] Index on expressions

2014-09-03 Thread Petite Abeille
On Sep 3, 2014, at 3:01 PM, Dominique Devienne ddevie...@gmail.com wrote: Asked differently, if adding this support, could this be done by adding virtual / computed columns to tables, and indexing those columns? Ohohohoho… virtual columns [1][2]…. yes… shinny! :) Now that would be rather

Re: [sqlite] Selecting dates...

2014-09-02 Thread Petite Abeille
On Sep 2, 2014, at 9:48 PM, jose isaias cabrera jic...@cinops.xerox.com wrote: Thoughts? Thanks. SQLite doesn’t have date per se. You are free to store dates as either text or number, or anything you please. But it’s your responsibility to keep it straight.

Re: [sqlite] Sorting by month with two dates input

2014-09-01 Thread Petite Abeille
On Sep 1, 2014, at 6:00 PM, Igor Tandetnik i...@tandetnik.org wrote: (case when billdate != '' then billdate else bdate end) Or, more succinctly: coalesce( nullif( billdate, ‘’ ), bdate ) (To OP: empty strings are E V I L. Don’t use them. Ever.)

Re: [sqlite] Sorting by month with two dates input

2014-09-01 Thread Petite Abeille
On Sep 1, 2014, at 9:19 PM, Keith Medcalf kmedc...@dessus.com wrote: On Sep 1, 2014, at 6:00 PM, Igor Tandetnik i...@tandetnik.org wrote: (case when billdate != '' then billdate else bdate end) Or, more succinctly: coalesce( nullif( billdate, '' ), bdate ) (To OP: empty strings

Re: [sqlite] Edinburgh Buses - SOLVED!!!

2014-08-27 Thread Petite Abeille
On Aug 27, 2014, at 7:19 PM, Errol Emden eem...@hotmail.com wrote: … Couple of minor list minutia: - When starting a new topic, create a new message, instead of replying to your previous one and merely changing its subject line. This will make it easier to keep track of new messages for

Re: [sqlite] Window functions?

2014-08-27 Thread Petite Abeille
On Aug 26, 2014, at 2:09 AM, Keith Medcalf kmedc...@dessus.com wrote: select id, category_id, name, min(price) as minprice from cat_pictures group by category_id; Done. And no need for any windowing functions … This peculiar behavior is very unique to SQLite. Most reasonable SQL

Re: [sqlite] Window functions?

2014-08-27 Thread Petite Abeille
On Aug 27, 2014, at 10:57 PM, Eduardo Morras emorr...@yahoo.es wrote: Sorry, don't understand why others will throw an exception in the group by, perhaps I'm misunderstanding the group by, but that should work on others engines. Because not all expressions are accounted for, i.e.: not a

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 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 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 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] Importing ~1000 CSV files faster

2014-08-19 Thread Petite Abeille
On Aug 19, 2014, at 11:11 PM, joe.fis...@tanguaylab.com joe.fis...@tanguaylab.com wrote: Is there something better I can do to improve this process? PRAGMA journal_mode = off; http://www.sqlite.org/pragma.html#pragma_journal_mode Perhaps one transaction? Perhaps turn something off? It

Re: [sqlite] SQLite relative dates and join query help

2014-08-13 Thread Petite Abeille
On Aug 13, 2014, at 3:43 AM, Keith Medcalf kmedc...@dessus.com wrote: I don't think you want max() around collections.book_in_date. You want the max(collection_date) but the book_in_date from that row. Since the collection_date is unique, the book_in_date can only come from one record.

Re: [sqlite] SQLite relative dates and join query help

2014-08-12 Thread Petite Abeille
On Aug 12, 2014, at 7:38 PM, Ben sqlite_l...@menial.co.uk wrote: The result I'm after is: id, prod_code, creation_date, last_book_in_date, last_collection_date Where the final two columns are from the collection which is the farthest in the future, but still within the 50-day period

Re: [sqlite] UEFA EURO 2012 Football Championship problem

2014-08-11 Thread Petite Abeille
On Aug 11, 2014, at 8:39 PM, Errol Emden eem...@hotmail.com wrote: 1. Matches in which neither team scored is not being displayed. Because you have an inner join to goal. If there no goal, then no entry will match. 2. Scores for the same matchid where both teams scored are appearing on

Re: [sqlite] What am I doing wrong?

2014-08-08 Thread Petite Abeille
On Aug 8, 2014, at 8:35 PM, Errol Emden eem...@hotmail.com wrote: I am to list the film title and the leading actor for all of the films 'Julie Andrews' played in. And another one, for diversity’s sake… Assuming a slightly different data model: with AndrewsMovie as ( select

Re: [sqlite] Variable values in Views

2014-07-28 Thread Petite Abeille
On Jul 28, 2014, at 3:53 PM, Jonathan Moules jonathanmou...@warwickshire.gov.uk wrote: Fair question, but I'm doing log analysis. Each set of tables will be for a given server that's being analysed. Alternatively, you could setup your tables as a set of distinct databases, one per server,

Re: [sqlite] WITH syntax error

2014-07-12 Thread Petite Abeille
On Jul 12, 2014, at 7:29 PM, Staffan Tylen staffan.ty...@gmail.com wrote: The following statement is flagged as invalid, so what's the correct way of coding it? Flagged by whom? Invalid how? Either way, from SQLIte point of view, looks legit the way it is.

Re: [sqlite] Sequential numbers

2014-06-24 Thread Petite Abeille
On Jun 24, 2014, at 10:47 PM, Dave Wellman dwell...@ward-analytics.com wrote: I need the values to be sequential. Well… if your data set is as small as you mentioned (20 records or less)… you could roll your own numbering schema with the simple expedient of attaching a trigger to your tables

Re: [sqlite] Understanding Sqlite

2014-06-04 Thread Petite Abeille
On Jun 4, 2014, at 8:35 AM, dd durga.d...@gmail.com wrote: What is/are the best practice(s) to become master in sqlite in short period of time for new developers (i mean, new to sqlite not for programming)? Master? In short time? Nope. If you don’t want to be a total phony, you will

Re: [sqlite] DELETE INSERT vs. REPLACE

2014-05-27 Thread Petite Abeille
On May 27, 2014, at 8:11 PM, Drago, William @ MWG - NARDAEAST william.dr...@l-3com.com wrote: Is there any difference between using REPLACE as opposed to deleting records and then inserting new ones to take their place? Same difference. For example: create table foo ( id integer

Re: [sqlite] Simple Select from IN - from a newbie.

2014-05-21 Thread Petite Abeille
On May 21, 2014, at 6:00 PM, Humblebee fantasia.d...@gmail.com wrote: only problem is that in this situation, the tables have already been defined and made by someone else so I cannot change it. I'm a bit stuck with the way it is. Nah… it’s software… you can always change it… in fact,

Re: [sqlite] Simple Select from IN - from a newbie.

2014-05-21 Thread Petite Abeille
On May 21, 2014, at 6:00 PM, Humblebee fantasia.d...@gmail.com wrote: At least this is what I'm thinking from my very very limited understanding of SQL and with the way that I'm trying to do this. SMITH: Doctor, it hurts when I do _this_. DALE: Don’t _do_ that. with DataSet as ( select

Re: [sqlite] how to write this commands?

2014-05-16 Thread Petite Abeille
On May 16, 2014, at 6:25 PM, Igor Tandetnik i...@tandetnik.org wrote: So with SQLite, the query without max() would work, and produce expected results. With another database engine that enforces SQL rules more strictly, the query without max() would fail with a syntax error. I figured I'd

Re: [sqlite] Foreign Key errors

2014-05-06 Thread Petite Abeille
On May 6, 2014, at 11:17 PM, Richard Hipp d...@sqlite.org wrote: It is theoretically possible to keep track of which constraints are failing so that the particular constraint can be identified in the error message. But that woudl require more memory and CPU cycles. That would be resources

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 1:14 AM, James K. Lowden jklow...@schemamania.org wrote: To amplify the point, the issue isn't pure fussiness or obligation to adhere to standards. A permissive parser invites error. Exactly. It's not hard to imagine select 1 where 1 - 1; was intended as

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 7:15 PM, Stephan Beal sgb...@googlemail.com wrote: Why expect an error? It's abstractly the same as saying WHERE 'a' = 'b’, I mean ‘where 1’, or ‘where ‘1 - 1’, or ‘where null’, or ‘where 0 / 0’, or any of this nonsense. There is nothing to compare. It’s nonsensical.

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 7:36 PM, Stephan Beal sgb...@googlemail.com wrote: Oh, but there is: 1-1 is an expression, the result of which is integer 0 It’s nonsensical as a where clause expression. (as opposed to string '0'), which, in all programming environments except, IIRC, Xenix, is boolean

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 8:00 PM, Richard Hipp d...@sqlite.org wrote: Petite's complaint is that in most other SQL database engines, 0 is not false. If you try to use 0 where a boolean is needed, you get a syntax error. In strict SQL, boolean and integer are incompatible types that cannot be

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 8:21 PM, RSmith rsm...@rsweb.co.za wrote: the idea that introducing more complication will make erros/bugs less is just false. Straw man argument, unrelated to the topic at hand. This is solely about the SQL parser failing short of reporting syntax errors for nonsensical

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 5, 2014, at 9:15 PM, RSmith rsm...@rsweb.co.za wrote: Je suis desole mon ami… Moi aussi :P I have no quarrel with you, good Sir Knight, but I must cross this bridge: select 1 where 1 is 1; select 1 where 1 is not 1; select 1 where 1 is ( 1 = 1 ); select 1 in ( null ); — oh… select

Re: [sqlite] select 1 where 1 - 1;

2014-05-05 Thread Petite Abeille
On May 6, 2014, at 12:15 AM, Jay Kreibich j...@kreibi.ch wrote: Cross what bridge? http://www.youtube.com/watch?v=zKhEw7nD9C4 You seem to be trying to use common sense and semantic meaning to make an argument. To quote an old CS prof, “If you argue in English**, you’re wrong.” Math

Re: [sqlite] Using SQLite for write only workload, splitting databases into smaller files, but need to query it as a whole

2014-05-03 Thread Petite Abeille
On May 3, 2014, at 2:59 PM, Hayden Livingston halivings...@gmail.com wrote: Thoughts? Take a look at ‘ATTACH’, it might help: http://www.sqlite.org/lang_attach.html ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Using SQLite for write only workload, splitting databases into smaller files, but need to query it as a whole

2014-05-03 Thread Petite Abeille
On May 3, 2014, at 3:40 PM, Hayden Livingston halivings...@gmail.com wrote: This looks promising. I sooo wish it didn't have a limit to number of databases. 10 by default if I recall properly. Can be perhaps be increased to 62 at most: http://www.sqlite.org/limits.html But I think I could

[sqlite] decomposing a path into its components?

2014-05-03 Thread Petite Abeille
Given a path, say: /subversion/bindings/swig/java/org/tigris/subversion/client/ One would like to decompose it into all its components, say: /subversion/ /subversion/bindings/ /subversion/bindings/swig/ /subversion/bindings/swig/java/ /subversion/bindings/swig/java/org/

Re: [sqlite] decomposing a path into its components?

2014-05-03 Thread Petite Abeille
On May 3, 2014, at 5:39 PM, Simon Slavin slav...@bigfraud.org wrote: On 3 May 2014, at 3:47pm, Petite Abeille petite.abei...@gmail.com wrote: Let further assume one would like to use only SQLite's build-in mechanism There are two kinds of programmers … Indeed: drunk and not yet drunk

[sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
Quick, without trying it out, what would you expect the following statement to return: select 1 where 1 - 1; (a) one row (b) no row (c) syntax error For extra entertainment, try some variations: select 1 where 1; select 1 where 0; etc... Bonus points for a rationalization of any of the

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
On May 2, 2014, at 8:54 PM, Richard Hipp d...@sqlite.org wrote: I'm guessing that Mr. Abeille is upset that SQLite … … doesn’t even bother with SQL syntax and will happily accept any old junk as a sorry excuse for a query. select 1 where null; select 1 where not null; When SQLite 4 sees the

Re: [sqlite] select 1 where 1 - 1;

2014-05-02 Thread Petite Abeille
On May 2, 2014, at 9:24 PM, Cory Nelson phro...@gmail.com wrote: quirks A peculiar behavioral habit. Idiosyncrasy, peculiarity, oddity, eccentricity, foible, whim, vagary, caprice. Indeed. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Bug in division?

2014-04-30 Thread Petite Abeille
On Apr 30, 2014, at 2:22 PM, John McKown john.archie.mck...@gmail.com wrote: PostgreSQL likewise returns 0 for 2/4 and .5 for 2/4.0 . This is likely a part of the SQL standard. Just to be contrarian, Oracle doesn’t and returns 0.5. Ah! ___

Re: [sqlite] Bug in division?

2014-04-30 Thread Petite Abeille
On Apr 30, 2014, at 8:50 PM, Jay Kreibich j...@kreibi.ch wrote: Given Oracle’s legacy, it might be that “2” defaults to a “numeric” type, rather than an integer. Indeed, there are no ‘integer’ type per se in Oracle. At least not at the SQL level. But more to the point, I don’t thing the

Re: [sqlite] SELECT alias name limitation

2014-04-28 Thread Petite Abeille
On Apr 28, 2014, at 9:27 PM, Staffan Tylen staffan.ty...@gmail.com wrote: (Thinking about it maybe WITH could be used, Yes, it’s a typical use case for WITH. but that doesn't answer the first question.) One cannot refer to an identifier in the same section it was declared in, and that’s

Re: [sqlite] Most efficient storage for arrays

2014-04-22 Thread Petite Abeille
On Apr 22, 2014, at 2:24 PM, Neville Dastur nevillebdas...@gmail.com wrote: So wondering is anyone that has done this sort of thing and worked out the best way? Yes. Normalize your data. And that’s that: http://www.schemamania.org/sql/#lists Quoting a few words: Questions are frequently

Re: [sqlite] CTEs and unions

2014-04-22 Thread Petite Abeille
On Apr 23, 2014, at 12:16 AM, Dominique Devienne ddevie...@gmail.com wrote: is there no way to reuse a CTE several times? Hrm… of course you can… that’s the entire point of *Common* Table Expression: with DataSet as ( select 1 as value ) select * fromDataSet union all select * from

Re: [sqlite] comma-separated string data

2014-04-07 Thread Petite Abeille
On Apr 7, 2014, at 3:28 PM, Dominique Devienne ddevie...@gmail.com wrote: For those interested, here's an article along the same lines that better demonstrate what I mean by the above: http://technology.amis.nl/2013/06/26/oracle-database-12c-joining-and-outer-joining-with-collections/ Aha!

Re: [sqlite] How to speed up a bulk import

2014-04-07 Thread Petite Abeille
On Apr 7, 2014, at 8:33 PM, J Trahair j.trah...@foreversoftware.co.uk wrote: Any suggestions welcome. Thank you. One word: transaction. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] comma-separated string data

2014-04-07 Thread Petite Abeille
On Apr 8, 2014, at 1:02 AM, David Simmons dsimmons...@earthlink.net wrote: Why are these people allowed to use this discussion board? Hmmm? What we've got here is failure to communicate perhaps. ___ sqlite-users mailing list

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-07 Thread Petite Abeille
On Apr 8, 2014, at 1:46 AM, Andreas Kupries andre...@activestate.com wrote: Most generally, a website to show off any kind of contribution to sqlite, be it custom function, virtual table, virtual filesystem, schemata, other extensions, … ? A bit obsolete, but: http://www.sqlite.org/contrib

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Petite Abeille
On Apr 6, 2014, at 10:01 PM, to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: You have to roll your own… e.g. blob literal + hexdump:

Re: [sqlite] How to query key-value-pairs similar to PostgreSQL HSTORE type?

2014-03-18 Thread Petite Abeille
On Mar 18, 2014, at 2:46 AM, Stefan Keller sfkel...@gmail.com wrote: Any suggestions on how to query this most efficiently (like [select value from some_key])? As mentioned, turn this construct into a regular relational table structure. If, for some reasons, you cannot even accomplish first

Re: [sqlite] How to query key-value-pairs similar to PostgreSQL HSTORE type?

2014-03-18 Thread Petite Abeille
On Mar 18, 2014, at 8:56 PM, Stefan Keller sfkel...@gmail.com wrote: And, actually, as you may have realized, PostgreSQL proved that even (post-)relational databases can handle KVP efficiently. Just because one can, doesn't mean one should. But, as always, to each their own.

Re: [sqlite] basic Window function

2014-03-13 Thread Petite Abeille
On Mar 13, 2014, at 4:17 PM, big stone stonebi...@gmail.com wrote: Is there anyone else, (besides little bee), that would like this request? Oh! Oh pick me! Pick me! Me! Me! M!” — Donkey, Shrek ___ sqlite-users mailing list

Re: [sqlite] About Syntax Diagrams

2014-03-11 Thread Petite Abeille
On Mar 11, 2014, at 3:51 AM, yulea...@163.com wrote: Now I have a non-technical issues. The syntax diagrams for SQLite on your SQLite website is so beautiful, and i want to draw one for myself but I do not know what software you use to draw it. Can you tell me? and, is it the software

[sqlite] curious idiom of the day...

2014-03-08 Thread Petite Abeille
with DataSet as ( select null as value union all select 'YES' as value union all select 'NO' as value union all select 'PERHAPS' as value ) select * fromDataSet where not exists ( select 1 where value = 'NO' )

[sqlite] sqlite_compileoption_get + cte

2014-03-01 Thread Petite Abeille
Just because we can: with Option( name, position ) as ( select sqlite_compileoption_get( 1 ) as name, 1 as position union all select sqlite_compileoption_get( position + 1 ) as name, position + 1 as position fromOption where sqlite_compileoption_get(

Re: [sqlite] sqlite_compileoption_get + cte

2014-03-01 Thread Petite Abeille
On Mar 1, 2014, at 7:46 PM, Bogdan Ureche bogdan...@gmail.com wrote: You are missing one value. To get all the values, start from 0: At least someone is paying attention! Thanks :) ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] sqlite_compileoption_get + cte

2014-03-01 Thread Petite Abeille
On Mar 1, 2014, at 6:30 PM, mm.w 0xcafef...@gmail.com wrote: ? PRAGMA compile_options; Yes, sure. But much snazzier to use a CTE, no? :D ( One very unfortunate aspect of pragmas is that one cannot query them with regular SQL… sigh…) ___

Re: [sqlite] basic Window function

2014-03-01 Thread Petite Abeille
On Mar 1, 2014, at 7:39 PM, big stone stonebi...@gmail.com wrote: Would it be possible to get a small basic subset of the sql windowing function for Sqlite 3.8.5 ? Yes! Pretty please :) Supporting windowing functions (aka analytics) would be a major breakthrough.

Re: [sqlite] sqlite_compileoption_get + cte

2014-03-01 Thread Petite Abeille
On Mar 1, 2014, at 9:34 PM, Stephan Beal sgb...@googlemail.com wrote: note the duplicate first entry. Make sure to start everything at zero: select sqlite_compileoption_get( 0 ) as name, 0 as position ___ sqlite-users mailing list

Re: [sqlite] HTML Tokenizer

2014-02-13 Thread Petite Abeille
On Feb 13, 2014, at 8:48 PM, Wang, Baoping bw...@kelleydrye.com wrote: New to Sqlite, anybody knows is there a HTML tokenizer for full text search, No. Or do I need to implement my own? If you feel the urge. Otherwise, try lynx -dump. For example: curl -s http://www.sqlite.org | lynx

Re: [sqlite] HTML Tokenizer

2014-02-13 Thread Petite Abeille
On Feb 13, 2014, at 9:08 PM, Petite Abeille petite.abei...@gmail.com wrote: curl -s http://www.sqlite.org | lynx -nolist -stdin -dump While we are at it, www.sqlite.org exhibits many validation errors: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.sqlite.org%2Fcharset=%28detect

Re: [sqlite] HTML Tokenizer

2014-02-13 Thread Petite Abeille
On Feb 13, 2014, at 9:52 PM, Jan Nijtmans jan.nijtm...@gmail.com wrote: But if you put the validator in HTML5 mode, there are many less errors: Possibly. But it says 'HTML 4.01 Strict' on the tin: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd” Either

Re: [sqlite] on insert new row, increment date with a month

2014-02-11 Thread Petite Abeille
On Feb 11, 2014, at 7:07 PM, Gert Van Assche ger...@gmail.com wrote: Does anyone know if it is possible for a date field to be automatically incremented with a month when a new record is created? If you are looking for something wacky, triggers are where to look:

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Petite Abeille
On Feb 10, 2014, at 5:19 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: The other features that would make teaching a bit easier would be to support left join explicitly and support the rfc4180 standard for csv files. Hmmm? Left join:

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Petite Abeille
On Feb 10, 2014, at 4:23 PM, Richard Hipp d...@sqlite.org wrote: Proposed Change To Address The Problem: What’s the problem exactly? CS101 students distress? That’s way beyond SQLite reach. My 2¢: don’t create a default persistent database. This is not helpful to anyone.

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-line shell

2014-02-10 Thread Petite Abeille
On Feb 10, 2014, at 7:39 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: That should have read right join. My personal opinion? Anyone even considering using a right outer join should be cursed into repeating their first day at high school. For ever. Groundhog Day, The High School

Re: [sqlite] Simple SELECT misbehaving in Sqlite 3.8.3 with ENABLE_STAT3

2014-02-10 Thread Petite Abeille
On Feb 10, 2014, at 8:05 PM, Bert Huijben rhuij...@apache.org wrote: As part of the Subversion 1.8.6 release we tried introducing some data in the 'sqlitstat_stat1' table using the recommended approach for Sqlite 3.8.0+ compatibility to tell sqlite about our 'bad indexes’: ( Not directly

[sqlite] recursive common table expression, an example

2014-02-03 Thread Petite Abeille
Now that 3.8.3 is officially out, we can all play with these nice little common table expressions! Yeah! So, while solving sudoku puzzles is all fine and dandy, the bread and butter of recursive queries is more along the lines of plain, old hierarchies. So, let create one: select 'A' as

Re: [sqlite] Common Table Expression

2014-02-03 Thread Petite Abeille
On Jan 25, 2014, at 6:25 PM, Petite Abeille petite.abei...@gmail.com wrote: On Jan 25, 2014, at 6:05 AM, Keith Medcalf kmedc...@dessus.com wrote: Read the docs. It explains how recursive CTEs are computed and how UNION ALL vs UNION work in CTEs. Hmmm… perhaps… doing is believing

Re: [sqlite] recursive common table expression, an example

2014-02-03 Thread Petite Abeille
On Feb 3, 2014, at 10:11 PM, big stone stonebi...@gmail.com wrote: bag colors bag1 blue - red - yellow bag2 green - yellow Does that really require a recursive query? Wouldn’t a simple group by + group_concat do as well? with DataSet as ( select 'bag1' as bag, 'blue' as color union all

Re: [sqlite] recursive common table expression, an example

2014-02-03 Thread Petite Abeille
On Feb 3, 2014, at 11:05 PM, big stone stonebi...@gmail.com wrote: group_concat is indeed super nice ! I didn't notice that little jewel of SQLite, thank you. You are welcome. But *do* read the very fine prints associated with that aggregate function:

Re: [sqlite] Troubleshooting nested query performance issue

2014-02-03 Thread Petite Abeille
On Feb 3, 2014, at 11:30 PM, Joseph L. Casale jcas...@activenetwerx.com wrote: I have a query Not directly related to your question, but… why oh why do people molest their queries by gratuitously and pointlessly aliasing perfectly good table name to meaningless random one letter codes?!?

Re: [sqlite] Fine tuning table indexes

2014-02-02 Thread Petite Abeille
On Feb 2, 2014, at 5:55 PM, Keith Medcalf kmedc...@dessus.com wrote: Nevertheless, each traversal operation is only using one index at a time. One word: bitmap. As in bitmap index: http://www.oracle.com/technetwork/articles/sharma-indexes-093638.html http://en.wikipedia.org/wiki/Bitmap_index

Re: [sqlite] too many SQL variables

2014-01-30 Thread Petite Abeille
On Jan 30, 2014, at 7:01 PM, E. Timothy Uy t...@loqu8.com wrote: Just for my edification, what is the limit on the number of SQL parameters? Today I hit too may SQL variables with about 1400… Just for our edification, which kind of statement was that?

Re: [sqlite] pragmas in subselects?

2014-01-29 Thread Petite Abeille
On Jan 29, 2014, at 9:58 PM, big stone stonebi...@gmail.com wrote: (killing two birds with one stone) No. One bird only. Enhancing ‘alter table’ is another kettle of fish altogether. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Petite Abeille
On Jan 26, 2014, at 5:09 PM, Stephan Beal sgb...@googlemail.com wrote: Is this possible? Sadly, no. Much of a PITA. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] pragmas in subselects?

2014-01-26 Thread Petite Abeille
On Jan 26, 2014, at 11:19 PM, big stone stonebi...@gmail.com wrote: == Is it the reason ? Well, that pragmas are not directly queryable from SQL just add insult to injury. What SQLite would really benefit from is a proper, consistent, queryable data dictionary such as the the standard

Re: [sqlite] Common Table Expression

2014-01-25 Thread Petite Abeille
On Jan 25, 2014, at 2:37 AM, James K. Lowden jklow...@schemamania.org wrote: Funny, we find ourselves on the opposite side of the compexity question this time. Ehehehe… yes… the irony is duly noted :) But, ok, then, let welcome our new VALUES overlord. May it have a long and prosperous

Re: [sqlite] Common Table Expression

2014-01-25 Thread Petite Abeille
On Jan 25, 2014, at 6:05 AM, Keith Medcalf kmedc...@dessus.com wrote: Read the docs. It explains how recursive CTEs are computed and how UNION ALL vs UNION work in CTEs. Hmmm… perhaps… doing is believing… so will experiment once the next SQLite release is officially out.

Re: [sqlite] Common Table Expression

2014-01-24 Thread Petite Abeille
On Jan 24, 2014, at 2:31 PM, Richard Hipp d...@sqlite.org wrote: Please see http://www.sqlite.org/draft/lang_with.html for draft documentation of the new Common Table Expression implementation for SQLite 3.8.3. Comments, criticism, and typo-corrections are appreciated. (1) What is this

Re: [sqlite] Common Table Expression

2014-01-24 Thread Petite Abeille
On Jan 24, 2014, at 11:32 PM, Clemens Ladisch clem...@ladisch.de wrote: It's exactly the same as SELECT …, but a little bit easier to write. (It behaves like with INSERT, but is now available in every place where a SELECT would be allowed.) Hmmm… seems rather pointless to me. select 1 as

Re: [sqlite] Dramatic performance difference between different PRAGMA synchronous settings for bulk inserts

2014-01-19 Thread Petite Abeille
On Jan 19, 2014, at 3:00 PM, Mario M. Westphal m...@mwlabs.de wrote: Also FTS4 is used, which also creates large tables. (Unrelated to your question, but, take a look at external content FTS4 table… they dramatically cut down the amount of duplicated data [1]) During an ingest phase, my

Re: [sqlite] Common Table Expression

2014-01-17 Thread Petite Abeille
On Jan 17, 2014, at 7:47 PM, big stone stonebi...@gmail.com wrote: - I just did my first recursive CTE under Ipython notebook. Finally! We can solve sudoku puzzles in SQL :P http://technology.amis.nl/2009/10/13/oracle-rdbms-11gr2-solving-a-sudoku-using-recursive-subquery-factoring/ Thanks a

Re: [sqlite] Solving the Sudoku with SQlite 3.8.3 trunk

2014-01-17 Thread Petite Abeille
On Jan 17, 2014, at 11:26 PM, big stone stonebi...@gmail.com wrote: Has anyone a clue ? No. But this is what Charlie the Unicorn has to say on the subject: Oh God you guys. This better be pretty important. Is the meadow on fire? ___ sqlite-users

Re: [sqlite] Recursive query?

2014-01-14 Thread Petite Abeille
On Jan 12, 2014, at 11:02 AM, Darren Duncan dar...@darrenduncan.net wrote: I would expect so; you can't have WITH RECURSIVE without WITH. It’s taking shape: http://www.sqlite.org/src/timeline?r=common-table-exprnd Oh, so, exciting! :) ___

Re: [sqlite] Recursive query?

2014-01-11 Thread Petite Abeille
On Jan 10, 2014, at 4:34 PM, Richard Hipp d...@sqlite.org wrote: FYI: The sponsor is now indicating that they want to go with WITH RECURSIVE. So the CONNECT BY branch has been closed and we are starting to work on a WITH RECURSIVE implementation. Much excellent. And much thanks to such

[sqlite] Recursive query?

2014-01-08 Thread Petite Abeille
Hello, Couldn’t help but notice a brand new branch in SQLite’s repository, the one labeled Start a new experimental branch for support of Oracle-style CONNECT BY syntax.”. http://www.sqlite.org/src/info/4365ddd62d Two reactions: (1) Recursive queries! Yes! Hurray! :D (2) CONNECT BY

  1   2   3   4   5   6   >