[sqlite] What sort of programming errors would cause these strange results?

2009-11-03 Thread Tim Romano
I have a SQLite database working quite nicely. The three main tables have 4 million rows and 275,000 rows respectively, and query response times are excellent: I have used several GUI front ends to query the data, and they jibe with each other, both with regard to the (accurate) results they

[sqlite] Question regarding modified ATTACH command

2009-11-03 Thread WClark
Hello, I have a question regarding a modification I've made to the ATTACH DATABASE command in Sqlite. The attached diff file (set against version 3.6.17) shows the modifications I've made, which I hope can be read quite simply. The modification involves adding an optional READONLY keyword;

Re: [sqlite] index optimal?

2009-11-03 Thread Griggs, Donald
Hi Sylvain, Regarding: can you describe an output of a explain? == A very short answer could be that, in the output of EXPLAIN QUERY PLAN If you see the name of an index, then that index is used. Regarding: is there something to tell us the best index to have for a specified

Re: [sqlite] Table within a table??

2009-11-03 Thread P Kishor
On Tue, Nov 3, 2009 at 4:51 AM, CityDev nab...@recitel.net wrote: I'm interested in your remark that relational databases now cope with 'arrays'. Personally I've never seen that in DB2, Jet or SQLite. That just seems so contrary to the original idea of the relational model that you shouldn't

Re: [sqlite] What sort of programming errors would cause these strange results?

2009-11-03 Thread Beau Wilkinson
Is it possible that the library is sorting the CUSTOMER.id list alphabetically not numerically, and jumping into the sorted PK list at the correct offset but finding the wrong value in that location as a result of the improper sort? That seems plausible. But speaking as a programmer, I do not

Re: [sqlite] User-defined infix functions

2009-11-03 Thread Jean-Christophe Deschamps
´¯¯¯ In your specific example you could simply define a custom LIKE function, and LIKE could become Unicode aware without any goofy new operators. `--- Yes of course, but I'm doing so to keep the possibility to use the native operator as well. ___

Re: [sqlite] index optimal?

2009-11-03 Thread Simon Slavin
On 3 Nov 2009, at 7:33pm, Sylvain Pointeau wrote: I just think that it could be useful to know if an index is optimal or not, kind of a tool that could give you the best index for speed up a query. Your brain. A simplified explanation on how to decide what indices you need follows.

[sqlite] Windows 7?

2009-11-03 Thread Adam DeVita
Good day, Will a new DLL be required for Windows 7 ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Getting older version from website

2009-11-03 Thread Edward Diener
Is it possible to retrieve an older version of sqlite from the web site rather than the latest version ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Table within a table??

2009-11-03 Thread Jay A. Kreibich
On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: Whilst it's true that SQL isn't essential for a relational database More to the point, any database that supports SQL does not, and cannot, support the data typing and data manipulation rules set out by the

[sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Shaun Seckman (Firaxis)
Hello all, I just wanted to find out whether or not this is the most ideal method for determining if a column exists in a table. My current technique is to do execute pragma table_info(tableName) then step through the results and perform a string comparison against the name

[sqlite] triggers revisited

2009-11-03 Thread Victor Mayevski
Ok, I will rephrase my question although it appears that the answer is has been already preconceived. I am writing an abstraction layer to Sqlite where tables, views, triggers etc are presented as XOTcl Classes/Objects. If two different scripts access the database and one of them creates a new

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Igor Tandetnik
Shaun Seckman (Firaxis) shaun.seck...@firaxis.com wrote: I just wanted to find out whether or not this is the most ideal method for determining if a column exists in a table. My current technique is to do execute pragma table_info(tableName) then step through the results and

Re: [sqlite] index optimal?

2009-11-03 Thread Sylvain Pointeau
Hi, many thanks for your answer, I just think that it could be useful to know if an index is optimal or not, kind of a tool that could give you the best index for speed up a query. Many thanks, Sylvain On Tue, Nov 3, 2009 at 2:52 PM, Griggs, Donald donald.gri...@allscripts.com wrote: Hi

Re: [sqlite] Table within a table??

2009-11-03 Thread John Crenshaw
Jay A. Kreibich wrote: On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: That just seems so contrary to the original idea of the relational model that you shouldn't have any data whose meaning is not defined by data (in the case of an array you need to understand the

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread David Bicking
You could try to prepare a statement like SELECT YourColumnName FROM YourTable; If prepare returns an error, then likely the error message will say the column doesn't exist. If no error, it does exist. Such a simple query shouldn't take long to prepare. Probably less time then to grab the

Re: [sqlite] Getting older version from website

2009-11-03 Thread Edward Diener
D. Richard Hipp wrote: On Nov 3, 2009, at 9:34 AM, Edward Diener wrote: Is it possible to retrieve an older version of sqlite from the web site rather than the latest version ? http://www.sqlite.org/download.html#cvs I have no idea how to find a release from that page. I go to a

Re: [sqlite] Ideal way to check whether a table has a specific column

2009-11-03 Thread Adam DeVita
Another way SELECT name, sql FROM sqlite_master WHERE type='table' and name ='yourtable name' the field sql will give you the full table structure as a string. Parse for your desired table name. No statements fail. On Tue, Nov 3, 2009 at 4:37 PM, Igor Tandetnik itandet...@mvps.org wrote:

Re: [sqlite] Table within a table??

2009-11-03 Thread Darren Duncan
Jay A. Kreibich wrote: On Tue, Nov 03, 2009 at 02:51:23AM -0800, CityDev scratched on the wall: That just seems so contrary to the original idea of the relational model that you shouldn't have any data whose meaning is not defined by data (in the case of an array you need to understand the

Re: [sqlite] Getting older version from website

2009-11-03 Thread D. Richard Hipp
On Nov 3, 2009, at 9:34 AM, Edward Diener wrote: Is it possible to retrieve an older version of sqlite from the web site rather than the latest version ? http://www.sqlite.org/download.html#cvs D. Richard Hipp d...@hwaci.com ___ sqlite-users

Re: [sqlite] User-defined infix functions

2009-11-03 Thread John Crenshaw
In your specific example you could simply define a custom LIKE function, and LIKE could become Unicode aware without any goofy new operators. John -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jean-Christophe Deschamps

Re: [sqlite] triggers revisited

2009-11-03 Thread Simon Slavin
On 3 Nov 2009, at 7:23pm, Victor Mayevski wrote: Ok, I will rephrase my question although it appears that the answer is has been already preconceived. I am writing an abstraction layer to Sqlite where tables, views, triggers etc are presented as XOTcl Classes/Objects. If two different

[sqlite] FTS3 IGNORE OR REPLACE????

2009-11-03 Thread sorka
Is there any way to have an intsert into an FTS3 table ignore a row if the ROWID being inserted already exists? This is turning out to be quite troublesome because I'm inserting thousands of records where just a few like 3 or 4 will have the same rowid as existing records. However, to do the test