Re: [sqlite] Speed comparison

2011-06-08 Thread Cecil Westerhof
There is no need for new speed comparisons? 2011/6/6 Cecil Westerhof : > I saw that there is the need for a speed comparison. I have MySQL > (5.1.53) installed (and when necessary I could install PostgreSQL). > Would it be interesting if I made those tests? If yes, what is

[sqlite] case_sensitive_like pragma not returning a value

2011-06-08 Thread John Quincy
Hi, from my experience the query "PRAGMA case_sensitive_like;" doesn't return the pragma's current value. I suppose this is the intended behavior but I'd like a confirmation since I can't find an answer in the docs. - John Q. ___ sqlite-users

Re: [sqlite] case_sensitive_like pragma not returning a value

2011-06-08 Thread Simon Davies
On 8 June 2011 08:50, John Quincy wrote: > Hi, > > from my experience the query "PRAGMA case_sensitive_like;" doesn't return the > pragma's current value. > > I suppose this is the intended behavior but I'd like a confirmation since I > can't find an answer in the docs.

Re: [sqlite] Cannot load SQLite.Interop.dll but file is in the folder

2011-06-08 Thread Cyrille
Dear Pavel, Finally, it seems that you were right: the person confirmed me that the software was not running with a PC with the framework 4.0. It works fine with another PC with framework 3.5. My application is compiled with the framework 3.0. Thus, could you please let me know what framework

[sqlite] Tcl: $ and @

2011-06-08 Thread Edward Brekelbaum
Hello, Let me start by saying using SQLite in Tcl is a real pleasure! I am having a problem determining when to use $ and when to use @ (and maybe I should use :, but I haven't tried it). I have three tables: terrain(x,y), detail(id integer primary key autoincrement, x, y), and units(id

[sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
Hi I am using getErrorCode() of SQLException to see if the exception is due to any database lock. I all the time get Errorcode to be 0 even though the getMessage is returning different messages. Can anyone let me know if there is some thing that i need to do to get the error codes correctly ?

[sqlite] SQLite encryption extension

2011-06-08 Thread NewsGroupSpam
Can anyone comment about whether the SEE is delivered as an amalgamation, or whether it comes as pre-amalgamation files? Thanks Doug ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Check restraint

2011-06-08 Thread noah hart
Assume that a table has several check restraints, such as a unique index and a foreign key. When inserting a row that violates more than one of the constraints, is there any way to tell which of the constraint would have been violated? Thanks, Noah Hart

Re: [sqlite] SQLite encryption extension

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 11:41 AM, NewsGroupSpam wrote: > Can anyone comment about whether the SEE is delivered as an amalgamation, > or > whether it comes as pre-amalgamation files? > SEE is a single file of C code that you append to a standard "sqlite3.c"

Re: [sqlite] Tcl: $ and @

2011-06-08 Thread Richard Hipp
On Wed, Jun 8, 2011 at 6:37 AM, Edward Brekelbaum wrote: > Hello, > Let me start by saying using SQLite in Tcl is a real pleasure! > > > I am having a problem determining when to use $ and when to use @ (and > maybe I > should use :, but I haven't tried it). > You should

[sqlite] detecting a corrupt database

2011-06-08 Thread dcharno
I have a database that returns SQLITE_CORRUPT during certain queries, but other than that it opens, closes and generally works fine. - Is there a way to check the database when its open, other than running through a bunch of test queries? - Is there any general way to fix corruption issues?

Re: [sqlite] detecting a corrupt database

2011-06-08 Thread Simon Slavin
On 8 Jun 2011, at 12:35pm, dcharno wrote: > I have a database that returns SQLITE_CORRUPT during certain queries, > but other than that it opens, closes and generally works fine. > > - Is there a way to check the database when its open, other than running > through a bunch of test queries?

Re: [sqlite] Slow rollback - possible causes?

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 9:02 PM, Eric Sigler wrote: > Hello! > > Does anyone know of a reason why we might be seeing SQLite transaction > rollbacks that take between 60 and 240 seconds? (One particularly odd > occurrence was almost 20 minutes long!) This doesn't seem to

Re: [sqlite] Slow rollback - possible causes?

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 10:03 PM, Eric Sigler wrote: > We haven't watched the WAL continuously, but we have noticed that the > WAL file grows slowly in size over time between application restarts > (around every 2 weeks). Currently, the WAL file for one of our DBs is >

Re: [sqlite] Check restraint

2011-06-08 Thread Richard Hipp
On Tue, Jun 7, 2011 at 12:11 PM, noah hart wrote: > Assume that a table has several check restraints, such as a unique index > and > a foreign key. > > When inserting a row that violates more than one of the constraints, is > there any way to tell which of the constraint

Re: [sqlite] Speed comparison

2011-06-08 Thread Mikael
I believe there is, it would be highly interesting. Please keep me and others posted, and let me and all others know the results of the test/-s! (Disclaimer: I'm in no way a part of the SQLite developer team, solely a ml member.) Kind regards, Mikael 2011/6/8 Cecil Westerhof

Re: [sqlite] Cannot load SQLite.Interop.dll but file is in the folder

2011-06-08 Thread Pavel Ivanov
> Thus, could you please let me know what framework has been used to > compile the "Precompiled Binaries For Windows" on the download page? > Should I re-compile SQLite with the same framework than the one used for > my application? Sorry, I can't answer these questions. I'm not on SQLite

[sqlite] How to know the offset of a rowid inside a table?

2011-06-08 Thread Marco Bambini
I have a table foo with N rows and I want to know the offset of the row with rowid X inside that table. What query/strategy should I perform? I assume that a brute force algorithm should be 1. SELECT * FROM foo ORDER BY rowid; 2. loop inside the recordset until X is found incrementing a counter

Re: [sqlite] How to know the offset of a rowid inside a table?

2011-06-08 Thread Martin.Engelschalk
Hi, select count(*) from foo where rowid < X Martin Am 08.06.2011 16:18, schrieb Marco Bambini: > I have a table foo with N rows and I want to know the offset of the row with > rowid X inside that table. > What query/strategy should I perform? > > I assume that a brute force algorithm should

Re: [sqlite] How to know the offset of a rowid inside a table?

2011-06-08 Thread Richard Hipp
On Wed, Jun 8, 2011 at 10:18 AM, Marco Bambini wrote: > I have a table foo with N rows and I want to know the offset of the row > with rowid X inside that table. > What query/strategy should I perform? > > I assume that a brute force algorithm should be > 1. SELECT * FROM foo

Re: [sqlite] How to know the offset of a rowid inside a table?

2011-06-08 Thread Marco Bambini
Thanks Martin and Richard, solution was so simple that I think to need a time break today. Should I add an ORDER BY rowid clause at the end of the SELECT statement or its implicit by the WHERE clause? Thanks a lot. -- Marco Bambini http://www.sqlabs.com On Jun 8, 2011, at 4:27 PM,

Re: [sqlite] How to know the offset of a rowid inside a table?

2011-06-08 Thread Martin.Engelschalk
Am 08.06.2011 16:37, schrieb Marco Bambini: > Thanks Martin and Richard, solution was so simple that I think to need a time > break today. No, an order by does not make any sense here, because the result set contains exactly one row. > Should I add an ORDER BY rowid clause at the end of the

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
Appreciate if anyone can help me. Thanks Sridhar On 08-06-2011 16:16, Sridhar Polavarapu wrote: > Hi > > I am using getErrorCode() of SQLException to see if the exception is > due to any database lock. I all the time get Errorcode to be 0 even > though the getMessage is returning different

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Martin.Engelschalk
Hello Sridhar, please tell us more: what interface are you using? what OS? SQLException is not a part of the sqlite library, so obviously you use an additional layer. Martin Am 08.06.2011 16:44, schrieb Sridhar Polavarapu: > Appreciate if anyone can help me. > > Thanks > Sridhar > > On

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
I am on windows 7 and this is my test code try { Statement stat = mconn.createStatement(); stat.execute(sql); resultSet = stat.getResultSet(); mconn.close(); break; } catch (SQLException e) {

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
Any one with java/JDBC experience please have a look at the snippet and let me know why I am not able to get the exact errorCode. Thanks Sridhar On 08-06-2011 21:23, Martin.Engelschalk wrote: > Hi, > > The important information is that you seem to use a JDBC driver. > Maybe someone with

[sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread datepb
Hello, This may seem a very simple issue it is giving me some very hard time. I need to add a variable amount of months to a date. According to the doc, this is done for adding 1 month : SELECT date('now','+1 month'); And I would need something like SELECT date('now','+$i month'); This

[sqlite] Table info for a particular query

2011-06-08 Thread Eric Zhao
Hi, I find the PRAGMA table_info(*tablename)* command very helpful. However, sometimes I want to extract table headers for a table constructed by a query which does not have the exact same headers as any one table in my database. For example: Table 1 headers: A, B, and C Table 2 headers: a,

Re: [sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread Pavel Ivanov
> The main issue for me here is that the +1 is inside the string '+1 month' > and i thus cant use a subquerry of the type SELECT date('now','+(SELECT id > FROM table) month'); You can do like this: SELECT date('now','+' || (SELECT id FROM table) || ' month'); Pavel On Wed, Jun 8, 2011 at

Re: [sqlite] Sqlite DATE() function. Add a variable amount of months.

2011-06-08 Thread datepb
It works perfectly, Thanks a lot! Sorry for the newbie question ! Pavel Ivanov-2 wrote: > >> The main issue for me here is that the +1 is inside the string '+1 month' >> and i thus cant use a subquerry of the type SELECT date('now','+(SELECT >> id >> FROM table) month'); > > You can do like

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Jim Morris
I've only used the xerial driver recently and haven't checked for the error code on exception. It does come with source, so you may be able to walk into the code to see how the value is set/retrieved. ___ sqlite-users mailing list

Re: [sqlite] Table info for a particular query

2011-06-08 Thread Pavel Ivanov
> Is there any way to do something along the lines of PRAGMA > some_command(SELECT * FROM table1 JOIN table2) and have it return A, B, C, > a, b, c as the headers? If you insist on getting results as resultset then there's no way to do that. But you can do the similar thing by using API like

Re: [sqlite] sqlite shell tab autocompletion SOLVED

2011-06-08 Thread prad
prad writes: > what tools are available to provide a decent console experience on sqlite? > thanks to the personal assistance provided by roger my problems are solved! i was using ver 3.6 and he suggested upgrading to the most recent version not only took away the woes,