[sqlite] SQLITE_CANTOPEN Bohrbug

2010-01-13 Thread Jamie Hardt
Hello all- Bear with me, my problem is a little goofy and has stolen six hours of my life. I'm using the C API of sqlite 3.6.12 on Mac OS X 10.6.2. I'm using a sqlite database table to collect paths from a filesystem. So, I have some C code that opens the database at the beginning of an

Re: [sqlite] Sort Alphanumeric, Numeric data in a VARCHAR

2010-01-13 Thread Jean-Christophe Deschamps
>I'm having trouble sorting the following data: > >point_number - VARCHAR(10) I've developped an SQLite extension including a very similar collation: it sorts the (integral) prefix first and, in case of a draw, orders based on the Unicode suffix. It currently doesn't cope with floating-point

Re: [sqlite] Sort Alphanumeric, Numeric data in a VARCHAR

2010-01-13 Thread Jay A. Kreibich
On Wed, Jan 13, 2010 at 05:11:16PM -0800, Gary Baranzini scratched on the wall: > If I do: SELECT point_number FROM mytable ORDER BY point_number; > I get the following: > > 1010.01 > 1010.09 > 11.01 > 11.23 > 55.09 > 77.01 > A03 > A06 Yes, that's the text sort order. > When I do the

Re: [sqlite] Sort Alphanumeric, Numeric data in a VARCHAR

2010-01-13 Thread D. Richard Hipp
On Jan 13, 2010, at 8:11 PM, Gary Baranzini wrote: > Hi, > > I'm having trouble sorting the following data: > > point_number - VARCHAR(10) > > 11.01 > 11.23 > 77.01 > 55.09 > A06 > 1010.01 > 1010.09 > A03 > > How can I get the A03, A06 at the end of the list? SELECT * FROM

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Jay A. Kreibich
On Wed, Jan 13, 2010 at 04:07:19PM -0800, Roger Binns scratched on the wall: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jay A. Kreibich wrote: > > All you really need to do is splice your code between the VFS that > > the SQLite engine sees and the native VFS layer that comes with

[sqlite] Sort Alphanumeric, Numeric data in a VARCHAR

2010-01-13 Thread Gary Baranzini
Hi, I'm having trouble sorting the following data: point_number - VARCHAR(10) 11.01 11.23 77.01 55.09 A06 1010.01 1010.09 A03 If I do: SELECT point_number FROM mytable ORDER BY point_number; I get the following: 1010.01 1010.09 11.01 11.23 55.09 77.01 A03 A06 When I do the

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Simon Slavin
On 14 Jan 2010, at 12:07am, Roger Binns wrote: > It is however a really bad idea > to write your own encryption scheme. [snip] > > History is littered with experts (no less) who designed schemes that later > turned out to be no good. Some examples are SSL version 1, SSL version 2 > and WEP.

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jay A. Kreibich wrote: > All you really need to do is splice your code between the VFS that > the SQLite engine sees and the native VFS layer that comes with the > distribution, adding a bit of extra code to xRead() and xWrite() to > munge the

[sqlite] compiler warning

2010-01-13 Thread j s
Hello, I am compiling sqlite-amalgamation-3.6.22 and get this warning: sqlite3.c: In function 'rtreeInit': sqlite3.c:109910: warning: cast from pointer to integer of different size on x86_64 GNU/Linux using the defaults from the configure script. Is this warning an issue to be concerned with

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Mark Spiegel
Sorry, Mr. Gold should contact DRH and ask about the encryption extension. My error. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Mark Spiegel
> I was under the impression that is how SEE works. Hooking the SQLite > Virtual File System interface seems like a very straight forward method. > All you really need to do is splice your code between the VFS that > the SQLite engine sees and the native VFS layer that comes with the >

Re: [sqlite] simple question about database lookup

2010-01-13 Thread Jay A. Kreibich
On Tue, Jan 12, 2010 at 04:12:01PM -0500, Qianqian Fang scratched on the wall: > On 1/12/2010 4:08 PM, Jay A. Kreibich wrote: >> SELECT group_concat( value ) FROM mydata WHERE id IN ( 'id_1', 'id_2', ... ) > > thank you very much for your quick response. I guess this will be > significantly faster

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Jay A. Kreibich
On Wed, Jan 13, 2010 at 11:07:50AM -0800, Mark Spiegel scratched on the wall: > > > Jay A. Kreibich wrote: > > On Tue, Jan 12, 2010 at 02:53:55PM -0500, Ray Gold scratched on the wall: > >> > >> My name is Ray Gold with Berliner, Corcoran & Rowe, LLP in Washington, DC. > >> > >> I am writing to

Re: [sqlite] Q. about core SQLite library

2010-01-13 Thread Mark Spiegel
Jay A. Kreibich wrote: > On Tue, Jan 12, 2010 at 02:53:55PM -0500, Ray Gold scratched on the wall: > >> Hello. >> >> My name is Ray Gold with Berliner, Corcoran & Rowe, LLP in Washington, DC. >> >> I am writing to ask if the core SQLite library (not the proprietary >> SQLite Extensions) has

Re: [sqlite] simple question about database lookup

2010-01-13 Thread Qianqian Fang
On 1/12/2010 5:36 PM, Kees Nuyt wrote: > There is a maximum list size the parser can cope with. > Internally "id IN (val1,val2,...valN)" > is converted to > "WHERE id = val1 OR id = val2 OR id = valN" > > http://www.sqlite.org/limits.html > > I think here > 5. Maximum Depth Of An

Re: [sqlite] Speed regression after 3.6.17

2010-01-13 Thread ve3meo
"Max Vlasov" wrote in message news:7cb963ca1001130315o69235717n92393be027eef...@mail.gmail.com... > > >> After much playing about, I have determined that it is necessary to >> violate >> the guidelines on not using INDEXED BY and NOT INDEXED in an attempt to >> optimise

Re: [sqlite] Writes during sleep of backup_step

2010-01-13 Thread Jean-Christophe Deschamps
Hi Dan, > > I've finally implemented the backup API and it works like a charm > > except on an important point. > > The example given on the site clearly says: > > > > "If another thread writes to database connection pDb while this > > function is sleeping, then the backup database (database

[sqlite] [ANN] SQLJet 1.0.2 is released.

2010-01-13 Thread Alexander Kitaev
Hello, We're glad to announce that SQLJet 1.0.2 has been released and available for download at http://sqljet.com/ web site. SQLJet is an independent pure Java open source implementation of the SQLite core functionality. SQLJet provides API to create, read and modify SQLite databases, but not to

Re: [sqlite] How to find Rank in SQLite3?

2010-01-13 Thread Tim Romano
In my last post, I wrote "salary bands" but it would be clearer to say "salary tiers". Dept, salary, rank 1, 75000, 1 1, 5, 2 1, 49000, 3 2, 7, 1 2, 68000, 2 3, 52000, 1 Tim ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Error in sqlite3 database opening

2010-01-13 Thread Simon Slavin
On 13 Jan 2010, at 8:39am, Rohan wrote: > Dear Sir/Maa'mI working in the applicaton where I need to open the sqlite3 > database and then to call system command but I am not able to call any > system command after calling any sqlite3 database command What happens when you try ? And if it's

Re: [sqlite] How to find Rank in SQLite3?

2010-01-13 Thread Tim Romano
Assuming you're doing this by department, try to get just a list of the distinct salary rankings into an inline view, using your count(*) +1 approach to set the salary rank, where these three columns are unique in combination: (dept, salary, rank ) as S and then : select EE.dept, EE.name,

Re: [sqlite] How to find Rank in SQLite3?

2010-01-13 Thread Tim Romano
Would all employees with the same salary have the same rank within a department? On 1/13/2010 5:06 AM, Jigar Shah wrote: > I have to migrate from MySQL to SQLite3. > > Following query in mysql gives the Rank for each employee within his dept > on the basis of salary. > >

[sqlite] Error in sqlite3 database opening

2010-01-13 Thread Rohan
Dear Sir/Maa'mI working in the applicaton where I need to open the sqlite3 database and then to call system command  but I am not able to call any system command after calling any sqlite3 database command please help me.Thanks RegardsRohan SharmaProgrammer 

Re: [sqlite] Writes during sleep of backup_step

2010-01-13 Thread Dan Kennedy
On Jan 13, 2010, at 10:27 AM, Jean-Christophe Deschamps wrote: > I've finally implemented the backup API and it works like a charm > except on an important point. > The example given on the site clearly says: > > "If another thread writes to database connection pDb while this > function is

Re: [sqlite] How to find Rank in SQLite3?

2010-01-13 Thread Pavel Ivanov
> I have used following query but it takes more than one hour even after > indexing, Shouldn't be - query is not so hard if a proper index used. What index did you create? >  mysql->select a.DEPTNO, a.EMPNO, a.LASTNAME, a.FIRSTNAME, a.SAL, >        ... >        -> order by x.DEPTNO, x.RANK;

Re: [sqlite] after recover lost data still lost

2010-01-13 Thread puk
Try: sqlite3 /path/to/SSD/databasefile .dump >db.sql If that doesn't recover enough, do the same for every single table in the database: sqlite3 /path/to/SSD/databasefile .dump tbl1 >db_tbl1.sql sqlite3 /path/to/SSD/databasefile .dump tbl2 >db_tbl2.sql ::

Re: [sqlite] Speed regression after 3.6.17

2010-01-13 Thread Max Vlasov
> > After much playing about, I have determined that it is necessary to violate > the guidelines on not using INDEXED BY and NOT INDEXED in an attempt to > optimise performance. Although you're very determined about your conclusions, I saw a misunderstanding about INDEXED BY in your statements.

[sqlite] How to find Rank in SQLite3?

2010-01-13 Thread Jigar Shah
I have to migrate from MySQL to SQLite3. Following query in mysql gives the Rank for each employee within his dept on the basis of salary. mysql-> select e.DEPTNO, e.EMPNO, e.LASTNAME, e.FIRSTNAME, e.SAL, find_in_set(e.SAL, x.SALLIST) RANK -> from EMPLOYEES as e, (select DEPTNO,