[sqlite] sql syntax grammar: single-source

2011-04-05 Thread Vitali Kiruta
Hi everybody, I hope somebody could clarify this for me. According to the sql grammar definition, the single-source production does not allow the table-alias after the join-source See http://www.sqlite.org/syntaxdiagrams.html#single-source However, when I'm trying to run this query it works

Re: [sqlite] sql syntax grammar: single-source

2011-04-05 Thread Richard Hipp
On Tue, Apr 5, 2011 at 8:30 AM, Vitali Kiruta kir...@gmail.com wrote: Hi everybody, I hope somebody could clarify this for me. According to the sql grammar definition, the single-source production does not allow the table-alias after the join-source See

Re: [sqlite] sql syntax grammar: single-source

2011-04-05 Thread Vitali Kiruta
This currently works.  But because it is not part of the language spec, we do not guarantee that we will continue to support it. Thanks a lot for quick answer. Do you mean the sqlite language spec, or the sql standard? I would be very much in favor of keeping this behavior. It makes select

[sqlite] SQL syntax diagrams

2010-01-15 Thread Andy Gibbs
Hi, I really like the way the SQL syntax diagrams are done (e.g. at http://www.sqlite.org/syntaxdiagrams.html). What software did you use for it? Regards Andy _ We want to hear all your

Re: [sqlite] SQL syntax diagrams

2010-01-15 Thread Dan Kennedy
On Jan 15, 2010, at 9:10 PM, Andy Gibbs wrote: Hi, I really like the way the SQL syntax diagrams are done (e.g. at http://www.sqlite.org/syntaxdiagrams.html) . What software did you use for it? http://wiki.tcl.tk/21708 Regards Andy

Re: [sqlite] SQL syntax diagrams

2010-01-15 Thread D. Richard Hipp
On Jan 15, 2010, at 9:10 AM, Andy Gibbs wrote: Hi, I really like the way the SQL syntax diagrams are done (e.g. at http://www.sqlite.org/syntaxdiagrams.html) . What software did you use for it? http://wiki.tcl.tk/21708 Also: http://www.sqlite.org/faq.html#q25 and

Re: [sqlite] SQL Syntax

2009-07-09 Thread Jean-Denis Muys
On 7/9/09 6:21 , Rick Ratchford r...@amazingaccuracy.com wrote: Okay, this worked, but I have NO IDEA why. SQLString = SELECT min(Year) FROM TmpTable _ WHERE Month=1 UNION _ SELECT max(Year) FROM TmpTable _ WHERE Month = 12

Re: [sqlite] SQL Syntax

2009-07-09 Thread Igor Tandetnik
Rick Ratchford wrote: Okay, this worked, but I have NO IDEA why. SQLString = SELECT min(Year) FROM TmpTable _ WHERE Month=1 UNION _ SELECT max(Year) FROM TmpTable _ WHERE Month = 12 LIMIT 2 Read about aggregate functions (min() is one of

Re: [sqlite] SQL Syntax

2009-07-09 Thread David Bicking
On Thu, 2009-07-09 at 10:47 +0200, Jean-Denis Muys wrote: On 7/9/09 6:21 , Rick Ratchford r...@amazingaccuracy.com wrote: Okay, this worked, but I have NO IDEA why. SQLString = SELECT min(Year) FROM TmpTable _ WHERE Month=1 UNION _ SELECT

Re: [sqlite] SQL Syntax

2009-07-09 Thread Rick Ratchford
Rick Ratchford wrote: Okay, this worked, but I have NO IDEA why. SQLString = SELECT min(Year) FROM TmpTable _ WHERE Month=1 UNION _ SELECT max(Year) FROM TmpTable _ WHERE Month = 12 LIMIT 2 Read about aggregate functions (min() is one of

Re: [sqlite] SQL Syntax

2009-07-09 Thread Rick Ratchford
Rick Ratchford wrote: Okay, this worked, but I have NO IDEA why. SQLString = SELECT min(Year) FROM TmpTable _ WHERE Month=1 UNION _ SELECT max(Year) FROM TmpTable _ WHERE Month = 12 LIMIT 2 Read about aggregate functions (min() is one

Re: [sqlite] SQL Syntax

2009-07-09 Thread Igor Tandetnik
Rick Ratchford r...@amazingaccuracy.com wrote: select (select min(Year) ...) as firstFullYear, (select max(Year) ...) as lastFullYear; If I go with the condensed version you illustrate above, I assume that I would then need to use the LIMIT clause, right? When I tried it, I get a

Re: [sqlite] SQL Syntax

2009-07-09 Thread Rick Ratchford
#Subject: Re: [sqlite] SQL Syntax # #Rick Ratchford r...@amazingaccuracy.com #wrote: # select #(select min(Year) ...) as firstFullYear, #(select max(Year) ...) as lastFullYear; # # If I go with the condensed version you illustrate above, I #assume that # I would then need to use the LIMIT

[sqlite] SQL Syntax

2009-07-08 Thread Rick Ratchford
I've been trying all kinds of different ways to accomplish the following, and my head is spinning. Problem: How do you return from the DB just the YEAR of the first and last YEAR that had dates from 1st week of January to last week of December? Clarification: Suppose you had a database that

Re: [sqlite] SQL Syntax

2009-07-08 Thread Rick Ratchford
, 2009 11:17 PM To: 'General Discussion of SQLite Database' Subject: [sqlite] SQL Syntax I've been trying all kinds of different ways to accomplish the following, and my head is spinning. Problem: How do you return from the DB just the YEAR of the first and last YEAR that had dates from 1st week

Re: [sqlite] SQL Syntax

2009-07-08 Thread John Machin
-boun...@sqlite.org] On Behalf Of Rick Ratchford Sent: Wednesday, July 08, 2009 11:17 PM To: 'General Discussion of SQLite Database' Subject: [sqlite] SQL Syntax I've been trying all kinds of different ways to accomplish the following, and my head is spinning. Problem: How do you return from

[sqlite] SQL syntax issue?

2007-02-08 Thread Sherlock, Ric
I've come across the following SQL syntax issue in Sqlite that is maybe a bug (or maybe just a product of my poor SQL knowledge!) I have a database that from the command line will execute the following statement fine: SELECT clients.cl_lname, clients.cl_title, price_profiles.pp_year FROM clients

[sqlite] SQL syntax possibilities

2005-11-16 Thread roger
uSQLite does not (generally) enter into the details of the query it is passed. There is however an exception for security. uSQLite requires a login and (depending on the user and network) assigns the user a level: 0: No access 1: Select only 2: Update/Insert only 3: Select/Update/Insert only 4:

Re: [sqlite] SQL syntax possibilities

2005-11-16 Thread Eric Bohlman
[EMAIL PROTECTED] wrote: uSQLite does not (generally) enter into the details of the query it is passed. There is however an exception for security. uSQLite requires a login and (depending on the user and network) assigns the user a level: 0: No access 1: Select only 2: Update/Insert only 3:

RE: [sqlite] SQL syntax possibilities

2005-11-16 Thread roger
Original Message Subject: Re: [sqlite] SQL syntax possibilities From: Eric Bohlman [EMAIL PROTECTED] Date: Wed, November 16, 2005 10:54 am To: sqlite-users@sqlite.org [EMAIL PROTECTED] wrote: uSQLite does not (generally) enter into the details of the query

Re: [sqlite] SQL syntax possibilities

2005-11-16 Thread Darren Duncan
At 1:34 AM -0700 11/16/05, [EMAIL PROTECTED] wrote: uSQLite does not (generally) enter into the details of the query it is passed. There is however an exception for security. uSQLite requires a login and (depending on the user and network) assigns the user a level: 0: No access 1: Select only

RE: [sqlite] SQL syntax possibilities

2005-11-16 Thread roger
Original Message Subject: Re: [sqlite] SQL syntax possibilities From: Darren Duncan [EMAIL PROTECTED] Date: Wed, November 16, 2005 10:41 pm To: sqlite-users@sqlite.org At 1:34 AM -0700 11/16/05, [EMAIL PROTECTED] wrote: uSQLite does not (generally) enter

RE: [sqlite] SQL syntax - please help

2005-07-03 Thread Dennis Volodomanov
PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] SQL syntax - please help I don't think that SQLite supports what you want yet. As soon as the SQL:2003 WITH RECURSIVE ... SELECT ... syntax is supported, you should be able to do what you want elegantly. Meanwhile, you will have to do multiple

[sqlite] SQL syntax - please help

2005-07-01 Thread Dennis Volodomanov
Hello all, I'm trying to form a specific query, but not sure if that's possible at all and if it is, how it should look like. I'd really appreciate your help :-) I have 2 tables (simplest case, but once I know this, I can work out the rest): CREATE TABLE TableA( UID INTEGER PRIMARY KEY,

[sqlite] SQL Syntax from 2.8 to 3.0 not backward compatible?

2004-06-25 Thread Guillaume Fougnies
Here is it: SQLite version 3.0.1 Enter .help for instructions sqlite BEGIN TRANSACTION ON CONFLICT ROLLBACK; SQL error: near ON: syntax error bye. -- Guillaume FOUGNIES - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [sqlite] SQL Syntax from 2.8 to 3.0 not backward compatible?

2004-06-25 Thread Daniel K
A BEGIN cannot have an ON CONFLICT clause in sqlite version 3. Dan. --- Guillaume Fougnies [EMAIL PROTECTED] wrote: Here is it: SQLite version 3.0.1 Enter .help for instructions sqlite BEGIN TRANSACTION ON CONFLICT ROLLBACK; SQL error: near ON: syntax error bye. -- Guillaume

Re: [sqlite] SQL Syntax from 2.8 to 3.0 not backward compatible?

2004-06-25 Thread Guillaume Fougnies
Ok. Perhaps it should be written in the documentation of SQLite Version 3 or in the chapter Transaction Control At The SQL Level of the Locking And Concurrency In SQLite Version 3. Thanks. bye. Fri, Jun 25, 2004 at 04:22:10AM -0700: Daniel K wrote: A BEGIN cannot have an ON CONFLICT clause in