Re: [sqlite] Questions about sqlite's join translation

2004-10-08 Thread D. Richard Hipp
Keith Herold wrote: The swiki says that making JOINs into a where clause is more efficient, since sqlite translates the join condition into a where clause. When SQLite sees this: SELECT * FROM a JOIN b ON a.x=b.y; It translate it into the following before compiling it: SELECT * FROM a, b

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Keith Herold
Well, you can always synchronize access and share the same pointer, right (in windows; using fork in unix is bad, presumably because fork() just copies all the data into the child)? It sucks if you are using sql_step, or, I imagine, precompiled queries, though. --Keith

[sqlite] Questions about sqlite's join translation

2004-10-08 Thread Keith Herold
The swiki says that making JOINs into a where clause is more efficient, since sqlite translates the join condition into a where clause. It also says that you make queries more effiecient by minimizing the number of rows returned in the FROM clause as far to the left as possible in the join. Does

Re: [sqlite] WinCE port

2004-10-08 Thread Nuno Lucas
Stober, Mel, dando pulos de alegria, escreveu : I created an MFC for WinCE version of shell.c to make it easier to enter text and see error messages. The problem I have is that insert SQL statement doesn't seem to work. Using the examples from here:

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Darren Duncan
At 4:28 PM -0500 10/8/04, Freeman, Michael wrote: I am pretty sure I know whats going on now. I am using POE (Perl Object environment, I highly recommend it poe.perl.org) and what is happening is my program is basically trying to do inserts into the database at the same time, which I think is

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Freeman, Michael
I am pretty sure I know whats going on now. I am using POE (Perl Object environment, I highly recommend it poe.perl.org) and what is happening is my program is basically trying to do inserts into the database at the same time, which I think is creating a deadlock. It can handle doing one insert at

[sqlite] WinCE port

2004-10-08 Thread Stober, Mel
I have it working -- sortof. Compiled the source code with eVC++ 3.0 for the Win32 emulator in debug mode to make the DLL easier to debug. (doing that on an actual PocketPC device is horrible!) I created an MFC for WinCE version of shell.c to make it easier to enter text and see error messages.

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Darren Duncan
At 3:26 PM -0500 10/8/04, Freeman, Michael wrote: Also, another weird error is that if I specify the full path to the database and I have DBI->trace(1); on, it says it can't connect to the database. Without the full path, It just says the trapdlog doesn't exist.. I was going to bring this up too,

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Freeman, Michael
I created the database using: dbish dbi:SQLite2:trapdlog.db create table trapdlog (epochtime, trap_category, trap_create_time, ip_hostname, trap_source, description, status); create index trapd_idx on trapdlog (ip_hostname,epochtime); I am able to connect to it with DBIsh and sqlite and it

Re: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Darren Duncan
The problem you are having is that, while your sqlite_connect() code assumes it is fine to just create a database file if it doesn't exist (which is what SQLite does automatically), your other code always assumes that the database file did exist before. Your other code is trying to update or

RE: [sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Freeman, Michael
I read this guys post on the yahoo groups site, http://groups.yahoo.com/group/sqlite/message/4528 He said this: I've solved the "no such table: " problem. I had a filename that was sometimes not properly NULL terminated. Along with /path/databasename there were a few /path/databasenameplusjunk

Re: [sqlite] Help with query

2004-10-08 Thread Fred Bleuzet
Without testing on my side... how's that? select a.Shop1, a.Shop2, a.Postcode, b.Code, b.Shopname, b.Address1, b.Price from NewsData a, Agents b where (a.Shop1 > '' or a.Shop2 > '') and b.Shopname > '' and (a.Shop1 = b.Shopname or a.Shop2 = b.Shopname) order by a.Postcode asc On Fri, 8 Oct 2004

Re: [sqlite] DBD::SQLite2

2004-10-08 Thread Darren Duncan
At 10:32 AM -0500 10/8/04, Freeman, Michael wrote: How come DBD::SQLite2 does not produce a 'sqlite' binary? Because it's not supposed to, and doing so would be redundant. The sole purpose of DBD::SQLite[2|] is to be a plug-in module for the Perl DBI framework, so you can use SQLite via the DBI

[sqlite] still having problems with DBD::SQLite2

2004-10-08 Thread Freeman, Michael
I am still having problems with a script trying to use SQLite2. My 4 line test script works fine, but my other code keeps giving me DBI errors saying it can't find the table. Here is what I get in the DBI trace. !! ERROR: 1 'no such table: trapdlog(1) at dbdimp.c line 412' (err#0) <-

[sqlite] Help with query

2004-10-08 Thread Brian Pugh
Hi, This query, "select distinct Shop1,Shop2,Postcode from NewsData where Shop1>'' or Shop2>'' order by Postcode asc" works as I require, but I want to expand the query to include data from another table, and have got a bit stuck The second table is called Agents. If the above query is

RE: [sqlite] eVC++ 3.0 port

2004-10-08 Thread Stober, Mel
Thank you very much for that link. I didn't know it existed! Mel Stober Tri-Cor Industries Inc./GATES AIT 618-632-9252 Ext 423 -Original Message- From: Jakub Adamek [mailto:[EMAIL PROTECTED] Sent: Friday, October 08, 2004 10:53 AM To: [EMAIL PROTECTED] Subject: Re: [sqlite] eVC++ 3.0

Re: [sqlite] eVC++ 3.0 port

2004-10-08 Thread Jakub Adamek
Did you try the sqlite-wince port? http://sqlite-wince.sf.net Jakub Stober, Mel wrote: has anyone ported sqlite 3.0 to PocketPC using eVC++ 3.0 compiler ? I'm trying it now and am having quite a few problems. For example, functions in are not supported as well as file locking. I'm also getting

RE: [sqlite] problems using DBD::Sqlite2

2004-10-08 Thread Freeman, Michael
Point taken, I wrote this e-mail last night when I was very tired and sick of trying to debug this. 8) Basically my script is using POE, the perl object environment, its an event driven state machine. In Detail "POE Parcels out execution time among one or more tasks, called sessions. Sessions

Re: [sqlite] sqlite3_get_table_printf, sqlite3_exec_printf not available anymore?

2004-10-08 Thread D. Richard Hipp
[EMAIL PROTECTED] wrote: We have been using sqlite3_get_table_printf, sqlite3_exec_printf functions in our C application to execute the queries. I find that these APIs are not available in v3.0.7 though it was available in v3.0.3. May I know why these APIs are not available in the stable sqlite

[sqlite] Escape charater of sqlite?

2004-10-08 Thread Carfield Yim
Can I escape a special character in SELECT statement? Is it using quote(X) function?

Re: [sqlite] Outter join question of sqlite

2004-10-08 Thread Kurt Welgehausen
> No reply gotten, this mean sqlite only support ANSI outter join syntax? Yes.

Re: [sqlite] temp_store assumptions

2004-10-08 Thread Demitri Muna
Mike, Thank you very much for your useful reply. the way to do this is to use a second db instance, open it to :MEMORY:, and copy the data (once) to this new db. then, you will have a RAM-based db, which should be fast. Yes, this is what I was hoping to do with the first method. Thanks - I'll

[sqlite] Outter join question of sqlite

2004-10-08 Thread Carfield Yim
> Does sqlite support outter syntax which similar to oracle, or sybase, > which don't need to change the FROM clause? > > Like > tableA.columnA *= tableB.columnB or tableA.columnA = tableB.columnB > ((+) > > ?? > No reply gotten, this mean sqlite only support ANSI outter join syntax?