[sqlite] No such column error

2020-03-23 Thread Aydin Ozgur Yagmur
I have been developing a c++ program in windows. In this program, in a loop, I open database, query and update the records then close it. I am encountering randomly with "No such column error". Query looks like that (but there are more columns than this STATUS table): "select a.BIRTH_DATE,

Re: [sqlite] Patch: VTable Column Affinity Question and Change Request

2020-02-05 Thread Keith Medcalf
gt;-Original Message- >From: sqlite-users On >Behalf Of Keith Medcalf >Sent: Wednesday, 5 February, 2020 10:58 >To: SQLite Users (sqlite-users@mailinglists.sqlite.org) us...@mailinglists.sqlite.org> >Subject: [sqlite] VTable Column Affinity Question and Change Req

Re: [sqlite] Is Comment column in 'EXPLAIN' blank?

2020-01-31 Thread x
Thanks David, getting them now. From: sqlite-users on behalf of David Raymond Sent: Friday, January 31, 2020 1:45:41 PM To: SQLite mailing list Subject: Re: [sqlite] Is Comment column in 'EXPLAIN' blank? To get the comments the library needs to have been

Re: [sqlite] Is Comment column in 'EXPLAIN' blank?

2020-01-31 Thread David Raymond
when I do a "pragma compile_options;" though. Is that setting one that's not reported by that pragma? -Original Message- From: sqlite-users On Behalf Of x Sent: Friday, January 31, 2020 6:22 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Is Comment column i

[sqlite] Is Comment column in 'EXPLAIN' blank?

2020-01-31 Thread x
I get the comments using the shell but running an explain query in c++ using sqlite3.c (from 3.30 amalgamation) column 7 is returning blank in every row. Is something up or is it my code? ___ sqlite-users mailing list

Re: [sqlite] No such column

2019-12-24 Thread Aydin Ozgur Yagmur
In a specific case, we have to use such a scenario. I'm aware it is contrary to traditional way, but for this specific "mounted drive" situation, is there a reasonable solution? Any way to avoid this kind of database file corruption? Thanks in advance, Best Regards, On Tue, Dec 24, 2019 at

Re: [sqlite] No such column

2019-12-24 Thread Darren Duncan
On 2019-12-22 10:48 p.m., Keith Medcalf wrote: On Sunday, 22 December, 2019 23:20, Aydin Ozgur Yagmur wrote: I have experienced a weird problem. I have been using sqlite database in linux by mounting. Can you give some clues what "using sqlite database in linux by mounting" means? My

Re: [sqlite] No such column

2019-12-23 Thread Aydin Ozgur Yagmur
g with customer, I > encounter "No such column" error. > > SQLite does not support accessing the database drive across a network. No > network file systems seem to implement file locking correctly, and if file > locking doesn't work correctly, SQLite cannot function correct

Re: [sqlite] No such column

2019-12-23 Thread Simon Slavin
On 23 Dec 2019, at 6:19am, Aydin Ozgur Yagmur wrote: > I have been using sqlite database in linux by mounting. > Nearly all times it works well. But when testing with customer, I encounter > "No such column" error. SQLite does not support accessing the database dri

Re: [sqlite] No such column

2019-12-22 Thread Keith Medcalf
On Sunday, 22 December, 2019 23:20, Aydin Ozgur Yagmur wrote: >I have experienced a weird problem. I have been using sqlite database in >linux by mounting. >Nearly all times it works well. But when testing with customer, I >encounter >"No such column" error. After restarting system, it works

[sqlite] No such column

2019-12-22 Thread Aydin Ozgur Yagmur
Hello, I have experienced a weird problem. I have been using sqlite database in linux by mounting. Nearly all times it works well. But when testing with customer, I encounter "No such column" error. After restarting system, it works again well. I wonder why I get such an error? Could you please

Re: [sqlite] Result set column names

2019-12-10 Thread Tim Streater
On 10 Dec 2019, at 21:42, Simon Slavin wrote: > On 10 Dec 2019, at 9:35pm, Doug wrote: > >> For column "xxx" what will the full column name be? "foo.xxx"? > > For column "xxx" in table "foo", yes. > > However, that's only if you've used "PRAGMA full_column_names". And that > PRAGMA is now

Re: [sqlite] Result set column names

2019-12-10 Thread Simon Slavin
On 10 Dec 2019, at 9:35pm, Doug wrote: > For column "xxx" what will the full column name be? "foo.xxx"? For column "xxx" in table "foo", yes. However, that's only if you've used "PRAGMA full_column_names". And that PRAGMA is now deprecated so you shouldn't use it.

Re: [sqlite] Result set column names

2019-12-10 Thread Doug
For column "xxx" what will the full column name be? "foo.xxx"? Doug > -Original Message- > From: sqlite-users > On Behalf Of Simon Slavin > Sent: Tuesday, December 10, 2019 10:37 AM > To: SQLite mailing list > Subject: Re: [sqlite] Result set colum

Re: [sqlite] Result set column names

2019-12-10 Thread Simon Slavin
On 10 Dec 2019, at 5:13pm, Doug wrote: > Just to be clear: If I define a column in a table named "xxx", and I "select > xxx from table", the report will show a column named "xxx" always. That's > what the standard says, right? It's not implementation dependent, right? Unless you have

Re: [sqlite] Result set column names

2019-12-10 Thread Doug
xx) VALUES(25) SELECT xxx FROM foo ---|- xxx 25 Doug > -Original Message- > From: sqlite-users > On Behalf Of Adrian Ho > Sent: Tuesday, December 10, 2019 8:04 AM > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] Result set column names > &g

Re: [sqlite] Result set column names

2019-12-10 Thread Adrian Ho
On 9/12/19 3:45 PM, Graham Holden wrote: > Monday, December 09, 2019, 7:25:25 AM, Clemens Ladisch > wrote: > >> The SQL-92 standard actually says: >> >> |Syntax Rules >> | >> |9) Case: >> | >> | b) If the i-th in the does not >> | specify an and the of that >> |

Re: [sqlite] Result set column names

2019-12-08 Thread Graham Holden
Monday, December 09, 2019, 7:25:25 AM, Clemens Ladisch wrote: > The SQL-92 standard actually says: > > |Syntax Rules > | > |9) Case: > | > | b) If the i-th in the does not > | specify an and the of that > | is a single , then the > | of the i-th

Re: [sqlite] Result set column names

2019-12-08 Thread Clemens Ladisch
Keith Medcalf wrote: > If you do not provide as AS clause to give a result column a name, then > each implementation is free to provide whatever names it feels like (so > sayeth the standard). The SQL-92 standard actually says: |6.4 | | ::= [ ] | |7.9 | | ::= |

Re: [sqlite] Result set column names

2019-12-08 Thread Keith Medcalf
On Saturday, 7 December, 2019 16:05, Tim Streater wrote: >At various times in various threads on this list it has been stated that >the column name in a result set is not guaranteed unless one uses AS. >IOW, one should say > > select abc as abc from mytable where i=23; > >rather than just: > >

Re: [sqlite] Result set column names

2019-12-07 Thread Simon Slavin
On 7 Dec 2019, at 11:09pm, J. King wrote: > It's stated here, at least: > Also note https://sqlite.org/pragma.html#pragma_short_column_names https://sqlite.org/pragma.html#pragma_full_column_names even though they are now both deprecated.

Re: [sqlite] Result set column names

2019-12-07 Thread J. King
On December 7, 2019 6:04:36 p.m. EST, Tim Streater wrote: >At various times in various threads on this list it has been stated >that the column name in a result set is not guaranteed unless one uses >AS. IOW, one should say > > select abc as abc from mytable where i=23; > >rather than just: > >

[sqlite] Result set column names

2019-12-07 Thread Tim Streater
At various times in various threads on this list it has been stated that the column name in a result set is not guaranteed unless one uses AS. IOW, one should say select abc as abc from mytable where i=23; rather than just: select abc from mytable where i=23; I'm trying to find where on

Re: [sqlite] Multiple Unique column missing in System.Data.DataTable.Constraints after Schema Filling

2019-11-25 Thread Simon Slavin
iled: XRelations.XID1, XRelations.XID2 sqlite> INSERT INTO XRelations VALUES (1,'b','m','first'); Error: UNIQUE constraint failed: XRelations.XRID sqlite> .mode column sqlite> PRAGMA index_list('XRelations'); 0 sqlite_autoindex_XRelations_1 1 u 0 sqlite>

[sqlite] Multiple Unique column missing in System.Data.DataTable.Constraints after Schema Filling

2019-11-25 Thread Jaroslav Homisin
Dear SQLite support, Develop informations:     Windows 7 64bit Visual StudioProfessional 2015 (Version 14.0.25431.01 Update 3);  .NET Build Platform 4.5.1 System.Data.SQLite.dll used from Installation  sqlite-netFx451-setup-bundle-x64-2013-1.0.112.0.exe  

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
l.com> wrote: > > >> SQLite does not have column types. It has column affinities instead. > > > > OK, so I would like to see that declared column affinity as that will > > determine how to process the data. > > Ah. You don't care about the data, you want the

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Simon Slavin
On 8 May 2018, at 5:37pm, Bart Smissaert <bart.smissa...@gmail.com> wrote: >> SQLite does not have column types. It has column affinities instead. > > OK, so I would like to see that declared column affinity as that will > determine how to process the data. Ah. You don'

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
> SQLite does not have column types. It has column affinities instead. OK, so I would like to see that declared column affinity as that will determine how to process the data. I have no problem doing this on the Windows PC. More difficult though to do this on Android. RBS On Tue, May 8, 2

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Simon Slavin
and what I wanted was to produce only real > as that > is what the column is declared as. SQLite does not have column types. It has column affinities instead. When you supply a value for a column SQLite will try to convert it into the desired type, but if it cannot do so (for instance, the column is t

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
> int sqlite3_column_type(sqlite3_stmt*, int iCol); Android and certainly B4A doesn't have that as far as I can see. RBS On Tue, May 8, 2018 at 3:21 AM, J Decker wrote: > https://www.sqlite.org/c3ref/column_blob.html > > int sqlite3_column_type(sqlite3_stmt*, int iCol); > >

Re: [sqlite] Getting statement column data types on Android

2018-05-08 Thread Bart Smissaert
Just tested that (TypeOf) on the Android phone and it doesn't do what I wanted. I tested on a column declared Real but with text values in it as well. It will give both real and text and what I wanted was to produce only real as that is what the column is declared as. RBS On Tue, May 8, 2018 at

Re: [sqlite] Getting statement column data types on Android

2018-05-07 Thread J Decker
https://www.sqlite.org/c3ref/column_blob.html int sqlite3_column_type(sqlite3_stmt*, int iCol); ? On Mon, May 7, 2018 at 4:28 PM, Bart Smissaert wrote: > Yes, thanks, that might be the best way, but it can get a bit complicated > with complex SQL. > > RBS > > > > On

Re: [sqlite] Getting statement column data types on Android

2018-05-07 Thread Bart Smissaert
Yes, thanks, that might be the best way, but it can get a bit complicated with complex SQL. RBS On Tue, May 8, 2018 at 12:05 AM, Simon Slavin wrote: > On 7 May 2018, at 10:49pm, Bart Smissaert > wrote: > > > Using B4A for a SQLite database app

Re: [sqlite] Getting statement column data types on Android

2018-05-07 Thread Simon Slavin
On 7 May 2018, at 10:49pm, Bart Smissaert wrote: > Using B4A for a SQLite database app on an Android phone. > B4A doesn't have functions like sqlite3_column_decltype and > sqlite3_column_type > and this is causing some difficulty getting the column datatypes of a row >

[sqlite] Getting statement column data types on Android

2018-05-07 Thread Bart Smissaert
Using B4A for a SQLite database app on an Android phone. B4A doesn't have functions like sqlite3_column_decltype and sqlite3_column_type and this is causing some difficulty getting the column datatypes of a row producing statement. If we have for example: create table Table1(ID Integer, Name

[sqlite] Preupdate hook column name

2018-04-12 Thread João Ramos
Hi, I've successfully added support for the sqlite3_preupdate_hook(), but I also need to get the column name when calling either sqlite3_preupdate_old() or sqlite3_preupdate_new(). I know that I can obtain the type of the value of the column at index i by calling sqlite3_value_type() but I also

Re: [sqlite] non-returned column aliases for repeating expressions?

2018-03-26 Thread E.Pasma
24 mrt 2018, Wout Mertens: ... SELECT "id" AS _1,"json" AS _2 FROM "testing" WHERE json_extract(json, '$.foo') < 50 ORDER BY json_extract(json, '$.foo') DESC,"id" ... SELECT _1, _2 FROM ( SELECT "id" AS _1,"json" AS _2, json_extract(json, '$.foo') AS _3 FROM "testing" WHERE _3 < 50 ORDER BY _3

Re: [sqlite] non-returned column aliases for repeating expressions?

2018-03-24 Thread Don V Nielsen
I'm not the sharpest tool in the shed, here, but a couple of observations / ideas. First, why in the ORDER clause use _3 and then "id" instead of _1? Using one alias and not the other is inconsistent and could be confusing. Personally, I would have did the following. Acquire the data using the

[sqlite] non-returned column aliases for repeating expressions?

2018-03-24 Thread Wout Mertens
Hi list, I often have (autogenerated) queries like SELECT "id" AS _1,"json" AS _2 FROM "testing" WHERE json_extract(json, '$.foo') < 50 ORDER BY json_extract(json, '$.foo') DESC,"id" where the json_extract(json, '$.foo') is indexed I wonder if it would be more efficient to write instead

Re: [sqlite] Using computed column once in SELECT

2017-11-23 Thread Keith Medcalf
>BTW, is ‘now’ value locked during the query execution to avoid the >possibility (however small) of two columns ending up with different >age calculations (e.g., running during date crossover on someone’s >birthday)? By default, 'now' is step stable (that is, it will return the same value for

Re: [sqlite] Using computed column once in SELECT

2017-11-23 Thread petern
CTE's can give you the dose of syntactic sugar you're craving: [No, you can reference other column definitions within the same SELECT statement.] WITH w_age_col AS (SELECT *,CAST((julianday('now')-julianday(dob))/365.25 AS INT)age FROM the_table) SELECT *, age,87-age life_expectancy FROM

[sqlite] Using computed column once in SELECT

2017-11-23 Thread Tony Papadimitriou
I don’t know if this has come up before. Example: select cast((julianday('now')-julianday(dob))/365.25 as int) age, 87-cast((julianday('now')-julianday(dob))/365.25 as int) life_expectancy (... assuming 87 year average life span) This works, but as you see the age calculation has to be

[sqlite] Error: ambiguous column name

2017-11-14 Thread Rob Golsteijn
Hi List, Given a table created as:   create table aaa(a); Sqlite reports an error "ambiguous column name: main.aaa.a" for the following query. select * from aaa, aaa; Error: ambiguous column name: main.aaa.a And also for similar queries select * from aaa INNER JOIN aaa; select * from

Re: [sqlite] Providing incrementing column to query

2017-06-25 Thread Jean-Luc Hainaut
Some suggestions, the validity of which depend on the context and whether some ordering must be preserved. Let T(C1 primary key,other_data) be the table with which we want to associate a sequence number (as pseudo column Seq). Technique 1: Computing Seq through a recursive CTE. create table

Re: [sqlite] Providing incrementing column to query

2017-06-24 Thread Paul Sanderson
Sanderson > > Sent: Saturday, 24 June, 2017 06:18 > > To: SQLite mailing list > > Subject: Re: [sqlite] Providing incrementing column to query > > > > Hmm thanks Clemens > > > > Have written an extension to do it - some of my tables are very big and > >

Re: [sqlite] Providing incrementing column to query

2017-06-24 Thread Keith Medcalf
-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > On Behalf Of Paul Sanderson > Sent: Saturday, 24 June, 2017 06:18 > To: SQLite mailing list > Subject: Re: [sqlite] Providing incrementing column to query > > Hmm thanks Clemens > > Have written an extensio

Re: [sqlite] Providing incrementing column to query

2017-06-24 Thread Paul Sanderson
Hmm thanks Clemens Have written an extension to do it - some of my tables are very big and feel that the extension might be a better route. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786

Re: [sqlite] Providing incrementing column to query

2017-06-24 Thread Clemens Ladisch
Paul Sanderson wrote: > I Have a number of queries to which I want to supply an incrementing column, > some of these queries involve without rowid tables. > > Is there a way of doing this with a SQL query? First, define a sort order, and ensure that it does not have duplicates. Then use a

[sqlite] Providing incrementing column to query

2017-06-24 Thread Paul Sanderson
I Have a number of queries to which I want to supply an incrementing column, some of these queries involve without rowid tables. I have no control over the design of the tables. So for a table defined as: CREATE TABLE (name text, age integer) with values Steve, 34 Eric, 27

Re: [sqlite] no such column error

2016-10-27 Thread Bart Smissaert
ite to > > report that myfield2 is unknown. Sqlite does not complain when I use > > mytable.myfield2 in other places in the query. > > > > CREATE TABLE mytable > > ( > >myfield1 INTEGER, > >myfield2 INTEGER > > ); > > > > UPD

Re: [sqlite] no such column error

2016-10-27 Thread Rob Golsteijn
LE mytable > ( >myfield1 INTEGER, >myfield2 INTEGER > ); > > UPDATE mytable >SET myfield1 = (SELECT 1 > ORDER BY EXISTS (SELECT 1 >WHERE mytable.myfield2 =1 > ) >

Re: [sqlite] no such column error

2016-10-26 Thread R Smith
On 2016/10/25 5:44 PM, Bart Smissaert wrote: Try this: UPDATE mytable SET myfield1 = (SELECT 1 from mytable ORDER BY EXISTS (SELECT 1 WHERE mytable.myfield2 = 1 ) ) RBS

Re: [sqlite] no such column error

2016-10-25 Thread Bart Smissaert
UPDATE mytable >SET myfield1 = (SELECT 1 > ORDER BY EXISTS (SELECT 1 >WHERE mytable.myfield2 =1 > ) > ); > > Error: no such column: mytable.myfield2 > > Tested wi

[sqlite] no such column error

2016-10-25 Thread Rob Golsteijn
   WHERE mytable.myfield2 =1 )   ); Error: no such column: mytable.myfield2 Tested with sqlite versions 3.8.4.3,  3.8.8.2,   3.11.1 and 3.15.0 (latest). Met Vriendelijke Groet, Kind Regards, Rob Golsteijn

Re: [sqlite] Referencing a column alias (subquery) as function parameter

2016-06-20 Thread R Smith
Just a fix - the last example had a mistake in and should read: Option 2 (CTE): WITH Q (c1, c2, cd, ac) AS ( SELECT c1, c2, CurrentDate, (CASE ActiveCol WHEN 0 THEN c3 ELSE c4 END) FROM ... ) SELECT c1, c2, cd, ac, MyFn(c1,ac,cd) AS xc1, MyFn(c2,ac,cd) AS xc2

Re: [sqlite] Referencing a column alias (subquery) as function parameter

2016-06-20 Thread R Smith
On 2016/06/20 6:21 PM, Bernard Ertl wrote: Is it possible to do something like this: SELECT c1, c2, CurrentDate, (CASE ActiveCol WHEN 0 THEN c3 ELSE c4 END) AS ac, MyFn(c1,ac,CurrentDate) AS xc1, MyFn(c2,ac,CurrentDate) AS xc2 FROM ... where c1, c2, CurrentDate, ActiveCol, c3, c4 are

Re: [sqlite] Referencing a column alias (subquery) as function parameter

2016-06-20 Thread Scott Robison
On Mon, Jun 20, 2016 at 10:21 AM, Bernard Ertl wrote: > Is it possible to do something like this: > > SELECT c1, c2, CurrentDate, (CASE ActiveCol WHEN 0 THEN c3 ELSE c4 END) AS > ac, > MyFn(c1,ac,CurrentDate) AS xc1, MyFn(c2,ac,CurrentDate) AS xc2 FROM > ... >

[sqlite] Referencing a column alias (subquery) as function parameter

2016-06-20 Thread Bernard Ertl
Is it possible to do something like this: SELECT c1, c2, CurrentDate, (CASE ActiveCol WHEN 0 THEN c3 ELSE c4 END) AS ac, MyFn(c1,ac,CurrentDate) AS xc1, MyFn(c2,ac,CurrentDate) AS xc2 FROM ... where c1, c2, CurrentDate, ActiveCol, c3, c4 are all columns in the table(s) referenced in the

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
So in your case (delphi usage) how do you do when using postgresql ? Cheers ! > Wed Aug 26 2015 4:52:02 pm CEST CEST from "Stephen Chrzanowski" > Subject: Re: [sqlite] Why sqlite show qualified >column >names when selecting from views ? > > I'm sure either #1 o

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
EST from "Simon Slavin" > Subject: Re: [sqlite] Why sqlite show qualified >column names when selecting from views ? > > On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte > wrote: > > >>But like it's already done on several other cases why not fix this i

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 26 Aug 2015, at 10:17am, Domingo Alvarez Duarte wrote: > But like it's already done on several other cases why not fix this issue and > wrap this fix with "#ifdef SQLITE_CLEAN_COLUMN_NAMES" that's not defined by > default so older code will remain working but new code can enable this and >

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Domingo Alvarez Duarte
I just tested this on postgresql and I always get unqualified column names as I would expect. I remember this was a lot worst in previous sqlite versions and I needed to play with two compile time/pragma flags and depending on that combination we got some bizarre results. I understand that

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Stephen Chrzanowski
message message about ambiguos column name. > > > > On the case mentioned apply rule 2, like postgresql do. > > Cheers ! > > > > Wed Aug 26 2015 2:35:41 pm CEST CEST from "Simon Slavin" > > Subject: Re: [sqlite] Why sqlite show qualified > >colum

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-26 Thread Simon Slavin
On 25 Aug 2015, at 10:27pm, Tim Streater wrote: > So how does that work with: > > create table newtable as select * from oldtable; > > Does that mean that, in principle, I could have any random set of column > names for my new table? Future versions of SQLite can do anything. In real

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Jean-Christophe Deschamps
At 22:28 25/08/2015, you wrote: >In the next version of SQLite3 the names of all columns will be >'columnname' "Don't trust me" could be more apropriate.

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Tim Streater
On 25 Aug 2015 at 19:37, Richard Hipp wrote: > On 25/8/15, Simon Slavin wrote: >> >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 8:52pm, Scott Robison wrote: > On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > >> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: >> >>> I vote to change it every release... Stimulate better habits! >> >> Seconded. Keep them on their toes! > > Or randomly generate names

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Petite Abeille
> On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > I vote to change it every release... Stimulate better habits! Seconded. Keep them on their toes!

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread R.Smith
On 2015-08-25 08:37 PM, Richard Hipp wrote: > On 8/25/15, Simon Slavin wrote: >> "If there is no AS clause then the name of the column is unspecified and may >> change from one release of SQLite to the next." >> > Heed this warning!!! > > And yet, there are countless tens of thousands of

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Stephan Beal
view > with "a.*" it doesn't qualify the names so I thought that was a mistake > when > we use individual names otherwise I would expected qualified names there > too. > > > Cheers ! > > Tue Aug 25 2015 19:45:27 CEST from "Simon Slavin" > > >

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
e Aug 25 2015 19:45:27 CEST from "Simon Slavin" >Subject: Re: [sqlite] Why sqlite show qualified column names when selecting >from views ? > > On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > > >>When querying views sqlite shows qualified column names if they

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Tim Streater wrote: > On 25 Aug 2015 at 19:37, Richard Hipp wrote: > >> On 25/8/15, Simon Slavin wrote: >>> >>> "If there is no AS clause then the name of the column is unspecified and >>> may >>> change from one release of SQLite to the next." > >> Heed this warning!!! >> >> And

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:52pm, sqlite-mail wrote: > I can understand your point, what confuses me is that when we query a view > with "a.*" it doesn't qualify the names so I thought that was a mistake when > we use individual names otherwise I would expected qualified names there too. I understand

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread sqlite-mail
Hello ! When querying views sqlite shows qualified column names if they are specified individually. Is this the expected result or a bug ? This behavior breaks some of my code that uses column names for other purposes. Cheers ! output of "test-view-alias" SQL: SELEC

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Simon Slavin
On 25 Aug 2015, at 6:13pm, sqlite-mail wrote: > When querying views sqlite shows qualified column names if they are specified > individually. Sorry but this has been mentioned a few times here and won't be changed. The SQL standard doesn't mention column names so SQL engines are free

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Richard Hipp
On 8/25/15, Simon Slavin wrote: > > "If there is no AS clause then the name of the column is unspecified and may > change from one release of SQLite to the next." > Heed this warning!!! And yet, there are countless tens of thousands of applications in circulation that have ignored this warning

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Scott Robison
On Aug 25, 2015 1:02 PM, "Petite Abeille" wrote: > > > > On Aug 25, 2015, at 8:53 PM, R.Smith wrote: > > > > I vote to change it every release... Stimulate better habits! > > Seconded. Keep them on their toes! > Or randomly generate names after every prepare! Or just leave them anonymous.

[sqlite] Using SQLite as a column-store database?

2015-07-29 Thread Jean Chevalier
Would it be realistic to pretend to use SQLite as a column-store database by leveraging ALTER TABLE ... ADD COLUMN massively and to expect better performance? Suppose that instead of defining a table like CREATE TABLE (key, c1, c2, ... cn) I defined it as CREATE TABLE (key) followed by n-times

[sqlite] Using SQLite as a column-store database?

2015-07-29 Thread Simon Slavin
On 29 Jul 2015, at 8:28pm, Jean Chevalier wrote: > Would it be realistic to pretend to use SQLite as a column-store database by > leveraging ALTER TABLE ... ADD COLUMN massively and to expect better > performance? Sorry. No. The data for each row is stored together. > Suppose

Re: [sqlite] Parentheses in column name

2014-12-23 Thread Stephan Beal
On Mon, Dec 22, 2014 at 9:19 PM, Federico Jurio < federicoju...@suremptec.com.ar> wrote: > E:\Pruebas>ogrinfo -sql "select min("(asd*)") MINASD from Geo1" Geo1.shp > You're using double quotes inside double quotes, which cannot parse how you expect it to. You need to change the outer quotes

Re: [sqlite] Parentheses in column name

2014-12-23 Thread RSmith
On 2014/12/22 22:19, Federico Jurio wrote: Hi guys, i'm trying to make a simple query using sqlite through gdal library ( http://www.gdal.org/ogr_sql.html ) I have a simple table with two columns: ID and (asd*) (both columns have integer values) I want the minimun value of this columns My

[sqlite] Parentheses in column name

2014-12-23 Thread Federico Jurio
Hi guys, i'm trying to make a simple query using sqlite through gdal library ( http://www.gdal.org/ogr_sql.html ) I have a simple table with two columns: ID and (asd*) (both columns have integer values) I want the minimun value of this columns My first attempt was successful E:\Pruebas>ogrinfo

Re: [sqlite] SQLite JDBC column count

2014-07-09 Thread Manoj
in context: http://sqlite.1065341.n5.nabble.com/SQLite-JDBC-column-count-tp76505p76551.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] SQLite JDBC column count

2014-07-08 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/07/14 22:51, Manoj wrote: > Is there any workaround available for this? https://sqlite.org/limits.html#max_column Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1 iEYEARECAAYFAlO8B14ACgkQmOOfHg372QRr6QCfZfbcFkz/lowVT8uBFy92FY/7

Re: [sqlite] SQLite JDBC column count

2014-07-08 Thread Simon Slavin
workaround available for this? Maybe a query to increase column > limit in SQLite jdbc? I cannot conceive of any way to hold the definitions of 2300 columns in your head at one time. Therefore your database is badly designed. It might be worth remembering that given the design of SQLite

[sqlite] SQLite JDBC column count

2014-07-08 Thread Manoj
Am using SQLite jdbc 3.7.2 and in a scenario i have a table with 2300 column which eventually throwed too many columns exception since the maximum allowed column count is 2000. Is there any workaround available for this? Maybe a query to increase column limit in SQLite jdbc? Thanks in advance

Re: [sqlite] Bug report: column name includes table alias when CTE is used

2014-04-21 Thread Kevin Benson
n no CTE is used, the alias is not present in the returned > > column name. > > > > SQLite version 3.8.4.3 2014-04-03 16:53:12 > > Enter ".help" for usage hints. > > Connected to a transient in-memory database. > > Use ".open FILENAME" to reopen on

Re: [sqlite] Bug report: column name includes table alias when CTE is used

2014-04-21 Thread Richard Hipp
On Mon, Apr 21, 2014 at 1:16 AM, Andre <andreest...@gmail.com> wrote: > Hi, > > Apparently when a CTE is used, the column name includes the table alias. > However, when no CTE is used, the alias is not present in the returned > column name. > > SQLite version 3.8.4.3

Re: [sqlite] Bug report: column name includes table alias when CTE is used

2014-04-20 Thread Simon Slavin
On 21 Apr 2014, at 6:16am, Andre <andreest...@gmail.com> wrote: > Apparently when a CTE is used, the column name includes the table alias. > However, when no CTE is used, the alias is not present in the returned > column name. SQLite has no standards at all about column n

[sqlite] Bug report: column name includes table alias when CTE is used

2014-04-20 Thread Andre
Hi, Apparently when a CTE is used, the column name includes the table alias. However, when no CTE is used, the alias is not present in the returned column name. SQLite version 3.8.4.3 2014-04-03 16:53:12 Enter ".help" for usage hints. Connected to a transient in-memory database.

Re: [sqlite] RFE: Rename Column

2014-01-06 Thread Peter Haworth
> > > > You're both right. Igor's statement pretty-much /is/ the reason one > cannot rename a column. One would need to write a parser and changer for > SQL statements that could identify and change column names in many > statements with all sorts of weird possibilities for formatting. > > Two

Re: [sqlite] RFE: Rename Column

2014-01-06 Thread Alek Paunov
On 06.01.2014 00:58, Simon Slavin wrote: On 5 Jan 2014, at 6:41pm, Petite Abeille wrote: On Jan 5, 2014, at 6:56 PM, Igor Tandetnik wrote: On 1/4/2014 7:15 PM, Elrond wrote: Short: Could you implement alter table rename column? The problem

Re: [sqlite] RFE: Rename Column

2014-01-06 Thread Elrond
Hi, On Sun, Jan 05, 2014 at 22:58:31 +, Simon Slavin wrote: [...] > You're both right. Igor's statement pretty-much /is/ the > reason one cannot rename a column. One would need to > write a parser and changer for SQL statements that could > identify and change column names in many

Re: [sqlite] RFE: Rename Column

2014-01-05 Thread Simon Slavin
On 5 Jan 2014, at 6:41pm, Petite Abeille wrote: > On Jan 5, 2014, at 6:56 PM, Igor Tandetnik wrote: > >> On 1/4/2014 7:15 PM, Elrond wrote: >>> Short: Could you implement alter table rename column? >> >> The problem would be, what to do with all

Re: [sqlite] RFE: Rename Column

2014-01-05 Thread Igor Tandetnik
n keys that reference that column? Sure, but that’s an unrelated set of problems, isn’t it? As it stands, one cannot even rename a column. In SQLite, if you update just the CREATE TABLE statement but no other parts of the schema, you may easily end up with a database that can't be opened

Re: [sqlite] RFE: Rename Column

2014-01-05 Thread Petite Abeille
On Jan 5, 2014, at 6:56 PM, Igor Tandetnik wrote: > On 1/4/2014 7:15 PM, Elrond wrote: >> Short: Could you implement alter table rename column? > > The problem would be, what to do with all the indexes, triggers, views and > foreign keys that reference that column? Sure,

Re: [sqlite] RFE: Rename Column

2014-01-05 Thread Igor Tandetnik
On 1/4/2014 7:15 PM, Elrond wrote: Short: Could you implement alter table rename column? The problem would be, what to do with all the indexes, triggers, views and foreign keys that reference that column? SQLite stores database schema as text, in the form of CREATE... statements. I suspect

[sqlite] RFE: Rename Column

2014-01-05 Thread Elrond
Hi everybody, Short: Could you implement alter table rename column? I know that sqlite does only support a limited subset of SQL. Some subsets have only been added lately, like foreign keys, and can be disabled at compile time to safe space. Renaming a table is already supported, which is good

Re: [sqlite] Sqlite accepts invalid column names

2013-06-24 Thread Richard Hipp
On Mon, Jun 24, 2013 at 8:32 AM, Rob Golsteijn wrote: > > I found the issue in SQLite version 3.7.15. Great if it is solved in the > latest version. > Fixed for 3.7.16 by check-in http://www.sqlite.org/src/info/99127a669c -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Sqlite accepts invalid column names

2013-06-24 Thread Rob Golsteijn
> On Thu, Jun 20, 2013 at 10:26 AM, Rob Golsteijn > wrote: > > > > > SELECT a.col2, > >b.col2, > >a.b.col2,-- invalid column name > >b.a.col2,-- invalid column name > >a.a.col2,-- invalid column name > >

  1   2   3   4   >