RE: [sqlite] INSERT INTO with SELECT

2006-11-15 Thread RB Smissaert
My text file is only an intermediate and I can make the way I want. I need to move data from Interbase to SQLite. Fastest method sofar is: IB > ADO recordset ADO recordset > text file Import text file with SQLite .import command Problem with .import is that it doesn't like double quotes. RBS ---

RE: [sqlite] SQLITE readonly Performance on a CD DB

2006-11-15 Thread Vis Naicker
[EMAIL PROTECTED] uttered: > I have 300K ..and the blob .. separate database.. CD > media, the performance .. 2 minutes sometime > to retreive the result >>>[Is the cdrom noisy at this point? Making intermittent whirring noises? Some cdroms are noisier than others.] * I tried different discs

[sqlite] 回复: [sqlite] Re: Newbie sqlite questions: c heck existence of column

2006-11-15 Thread Linker M Lin
And mine is: >>> import sqlite >>> sqlite.version '1.1.8' >>> -- Linker M Lin [EMAIL PROTECTED] ※ ※※我思故我在※※ ※ - 原始邮件 发件人: Florent THIERY <[EMAIL PROTECTED]> 收件人: sqlite-users@sqlite.org 已发送: 2006/11/13(周一), 下午10:09:12 主题: [sqlite] Re: Newbie sqlite questions: che

Re: [sqlite] INSERT INTO with SELECT

2006-11-15 Thread Jay Sprenkle
You should create your database and your table first. Do that in sqlite3.exe using your create table statement below. What format is your text file in? What separates one field from another? On 11/14/06, RB Smissaert <[EMAIL PROTECTED]> wrote: Thanks and in fact I had a look at your text import

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Jay Sprenkle
On 11/15/06, RB Smissaert <[EMAIL PROTECTED]> wrote: OK, writing the textfile as inserts and running that is a bit slower than the .import, but it has one advantage and that is that comma's in the field are no problem as the values can be enclosed in double-quotes. With the .import I had to take

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Not sure if Shell can do something like that. What would the VB code be? RBS -Original Message- From: Clark Christensen [mailto:[EMAIL PROTECTED] Sent: 15 November 2006 23:53 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Importing text file via .bat file Shell - Original Messag

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Clark Christensen
Shell - Original Message From: RB Smissaert <[EMAIL PROTECTED]> To: sqlite-users@sqlite.org Sent: Wednesday, November 15, 2006 2:16:32 PM Subject: RE: [sqlite] Importing text file via .bat file > sqlite3 c:\sqlite\ReadCode.db ".read c:\sqlite\ReadCode.sql" Not sure how that would work

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
OK, writing the textfile as inserts and running that is a bit slower than the .import, but it has one advantage and that is that comma's in the field are no problem as the values can be enclosed in double-quotes. With the .import I had to take the comma's out first. There weren't many comma's and i

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
> sqlite3 c:\sqlite\ReadCode.db ".read c:\sqlite\ReadCode.sql" Not sure how that would work from VBA. Did you mean to run this with Shell or the Windows API? RBS -Original Message- From: Clark Christensen [mailto:[EMAIL PROTECTED] Sent: 15 November 2006 21:37 To: sqlite-users@sqlite.

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Hi Clark, I started out with doing everything from VBA, setting up the ADO recordset with data from IB, then creating a SQLiteDb.Recordset (I use the VB wrapper from Terra Informatica) then pushing data from the ADO recordset to the SQLiteDB recordset and then doing updates every so many cycles of

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Clark Christensen
RBS, Sorry to jump in late here. Others have given good advice, but I'm wondering, since this is all running from VB, why not do all the work in VB and skip the batch (or cmd) file. I'm not a VB guy, but I do know it's pretty powerful. Are you having some trouble with a VB wrapper for SQLite?

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
The application is run from a VBA .xla add-in with a number of VB6 ActiveX helper files. Good point, I could delete the imported text file and use that As the trigger to notify VBA that all is done. Not sure VBA can monitor a rename event other that by running a loop and checking for the existence

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
There is no actual VBS file. I run it like this from VBA: Sub UpdateReadSQLite2(bShowSQL As Boolean) Dim oShell UpdateReadTextFile bShowSQL, True Application.StatusBar = _ "transferring the data from ReadCodeNoQuotes.txt to the SQLite DB" Set oShell = CreateObject("WSCript.shell"

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Didn't know about .cmd scripts (not that I know much about .bat) and will have a look at that. There is a slim chance that some of my users are still on Win98, so that could be a problem. Will have a look at Sqlite3Explorer as well. Only started with SQLite a few days ago, but I can see it is grea

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Kees Nuyt
On Wed, 15 Nov 2006 19:46:32 -, you wrote: >Kees, > >Just one other thing needed. >In the .sql file is there a way to notify VB that the text import is >finished? I run the .bat file now from VBS, so it won't be visible. >I couldn't see anything suitable in the dot commands to tell VB. > >RBS

Re: [sqlite] Sqlite books

2006-11-15 Thread Rich Shepard
On Wed, 15 Nov 2006, Michael Young wrote: Does the book offer any details on compiling that might make the purchase worthwhile? Mike, I don't know. But, on page 31 "SQLite on POSIX Systems," he starts with, "If you are using Mac OS 10.4 ("Tiger") or greater, you already have SQLite on your

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Kees Nuyt
On Wed, 15 Nov 2006 19:15:38 -, you wrote: >Hi Kees, > >Thanks a lot for that. All working perfect now. >I think all this should be on the SQLite site as >it took me a long time to get this fixed. http://www.sqlite.org/sqlite.html and the .help command taught me the commands, http://www.sqli

Re: [sqlite] Sqlite books

2006-11-15 Thread Michael Young
I've had PHP5 for two months now and have not been able to compile it successfully on my Mac so that SQLite 3.x files can be accessed. I had hoped to find help in compiling in Mike Owens' book. Does the book offer any details on compiling that might make the purchase worthwhile? I've tried

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread epankoke
I've noticed that you mention both VB and VBS. Is this something that you are eventually going to run from an actual VB application? If so, you might be able to use a directory notification on the directory where the import is, then just trigger an action when the import file is deleted, which

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Of course the .bat file could make a little file to notify VB. Still, running a loop to check for this is not ideal. RBS -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: 15 November 2006 19:37 To: sqlite-users@sqlite.org Subject: RE: [sqlite] Importing text file vi

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Will see if I can get that .bat file working. Thanks again. One thing I will need to figure out is how to notify VB that all is finished. I suppose I could run a loop at the end of my VB procedure checking for something, but I couldn't see anything suitable (amongst the dot commands) that VB could

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Kees, Just one other thing needed. In the .sql file is there a way to notify VB that the text import is finished? I run the .bat file now from VBS, so it won't be visible. I couldn't see anything suitable in the dot commands to tell VB. RBS -Original Message- From: Kees Nuyt [mailto:[E

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread Griggs, Donald
Echo .mode csv >MyCommands.tmp Echo .import ReadCode.txt ReadCode >>MyCommands.tmp Sqlite3 ReadCode.db ".read myCommands.tmp" = -Original Message- From: RB Smissaert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 1:13 P

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Hi Kees, Thanks a lot for that. All working perfect now. I think all this should be on the SQLite site as it took me a long time to get this fixed. Nogmaals bedankt. RBS -Original Message- From: Kees Nuyt [mailto:[EMAIL PROTECTED] Sent: 15 November 2006 18:54 To: sqlite-users@sqlite.or

Re: [sqlite] Query planner confusion

2006-11-15 Thread Jean-Paul Calderone
On Wed, 15 Nov 2006 03:28:50 +, [EMAIL PROTECTED] wrote: Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: I've hit a case where SQLite is selecting a suboptimal index for my query and I want to do something to tell it to use a different index. I'm familiar with the "+" trick to confuse the

Re: [sqlite] fts2 selecting terms

2006-11-15 Thread Scott Hess
On 11/14/06, Vikram Bhandoh <[EMAIL PROTECTED]> wrote: I'm using fts2 to index some documents. And I want to get a list of all the distinct terms that are in those documents. Is there a seperate table which holds the terms or is there a function maybe like snippet, offset? Just to clarify - you

Re: [sqlite] Importing text file via .bat file

2006-11-15 Thread Kees Nuyt
On Tue, 14 Nov 2006 23:44:12 -, you wrote: >Have figure out now what the quickest way is to move data from Interbase to >a SQLite db file: >IB to ADO recordset >Recordset to text >Import the text file with the .import command. > >Now I am trying to figure out how to automate the last step with

Re: [sqlite] Handling null characters in blob data

2006-11-15 Thread John Stanton
Vivien Malerba wrote: On 11/13/06, Shivshankar Subramani - TLS , Chennai <[EMAIL PROTECTED]> wrote: Hi all, > SQLite version 2.8 and earlier could not (easily) store binary > data - data with embedded \000 characters. Thus the encode/decode > routines were provide to transform data so that i

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread RB Smissaert
Hi Donald, Thanks, but I don't quite get it yet. What is in this file MyCommand.tmp? Is there no way to put the whole thing in on .bat file or even better run the whole sequence from VB? RBS -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: 15 November 2006 15:02

Re: [sqlite] Re: unrecognized token error

2006-11-15 Thread Florent THIERY
THANK YOU A LOT, it works like a charm now :) In fact, my hash wasn't calculated the same way before, and the hash wasn't starting with a number, so i did'nt realized why it was malfunctioning. Have a nice evening Florent On 11/15/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Florent THIERY

RE: [sqlite] unrecognized token error

2006-11-15 Thread Robert Simpson
> -Original Message- > From: Florent THIERY [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 15, 2006 9:27 AM > To: sqlite-users@sqlite.org > Subject: [sqlite] unrecognized token error > > Hi > > My request: > > "create table %s (profileID char(32) etc...)" % (tableID) # > Where

Re: [sqlite] Sqlite books

2006-11-15 Thread Christian Smith
John Gunnarsson uttered: Hi, I'm about to buy a book about Sqlite. I'm coding in C++ so I'm looking for the best book to suite my needs. In my local bookstore I have: The Definitive Guide to SQLite, APress http://www.apress.com/book/bookDisplay.html?bID=10130 and SQLite, Sams http://safari.s

[sqlite] Re: unrecognized token error

2006-11-15 Thread Igor Tandetnik
Florent THIERY <[EMAIL PROTECTED]> wrote: "create table %s (profileID char(32) etc...)" % (tableID) # Where tableID is a 32 char hexstring (hash) 4b0c25789ab124628444951dd995fdcc in this case Table name must be a proper identifier (begin with letter or underscore, consist of letters, digits

[sqlite] unrecognized token error

2006-11-15 Thread Florent THIERY
Hi My request: "create table %s (profileID char(32) etc...)" % (tableID) # Where tableID is a 32 char hexstring (hash) 4b0c25789ab124628444951dd995fdcc in this case create table 4b0c25789ab124628444951dd995fdcc (profileID char(32) , _soi char(7) etc. ) The unswear: _sqlite.DatabaseError:

Re: [sqlite] autoincrement and integer primary key

2006-11-15 Thread gwithrow
In the FAQ's on the web site it indicated that when the primary key is autoincrement, the data type is a signed 64 bit number. Has this been your experience? Gary W Withrow Senior Software Engineer HID Global 11674 N. Huron Northglenn, CO 80234 303-453-4020 - Office 303-378-7647 - Cell "We are

Re: [sqlite] SQLITE readonly Performance on a CD DB

2006-11-15 Thread Christian Smith
[EMAIL PROTECTED] uttered: I have 300K records in my database and the blob text file (invoices) in a separate database. I query the database over a network or USB stick and the performance is good. However when I moved my database to CD media, the performance dropped drastically. It takes 2 mi

RE: [sqlite] Importing text file via .bat file

2006-11-15 Thread Griggs, Donald
Regarding: "...but how would I combine all this in one .bat file ...?" Hello, RBS. The following is in windows commandline syntax: Echo .mode csv >MyCommands.tmp Echo .import ReadCode.txt ReadCode >>MyCommands.tmp Sqlite3 ReadCode.db ".read myCommands.tmp" or, i

Re: [sqlite] index in CREATE TABLE

2006-11-15 Thread Cécilia Vigny
Mario Frasca a écrit : Cécilia Vigny wrote: With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example : CREATE TABLE table_name ( id int(6) NOT NULL auto_increment, field_name date default NULL, PRIMARY KEY (id), KEY idx_field_name (fieldname), ) ;

Re: [sqlite] Sqlite books

2006-11-15 Thread Rich Shepard
On Wed, 15 Nov 2006, John Gunnarsson wrote: The Definitive Guide to SQLite, APress http://www.apress.com/book/bookDisplay.html?bID=10130 SQLite, Sams John, Check the publication dates and versions they cover. I bought a copy of the former and like it a lot. It explained many things an

Re: [sqlite] index in CREATE TABLE

2006-11-15 Thread Mario Frasca
Cécilia Vigny wrote: With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example : CREATE TABLE table_name ( id int(6) NOT NULL auto_increment, field_name date default NULL, PRIMARY KEY (id), KEY idx_field_name (fieldname), ) ; I want to know if there

Re: [sqlite] Re: index in CREATE TABLE

2006-11-15 Thread Cécilia Vigny
Igor Tandetnik a écrit : Cécilia Vigny wrote: With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example : CREATE TABLE table_name ( id int(6) NOT NULL auto_increment, field_name date default NULL, PRIMARY KEY (id), KEY idx_field_name (fieldname), )

[sqlite] Re: index in CREATE TABLE

2006-11-15 Thread Igor Tandetnik
Cécilia Vigny wrote: With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example : CREATE TABLE table_name ( id int(6) NOT NULL auto_increment, field_name date default NULL, PRIMARY KEY (id), KEY idx_field_name (fieldname), ) ; I want to know if there i

[sqlite] index in CREATE TABLE

2006-11-15 Thread Cécilia Vigny
Hi, With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example : CREATE TABLE table_name ( id int(6) NOT NULL auto_increment, field_name date default NULL, PRIMARY KEY (id), KEY idx_field_name (fieldname), ) ; I want to know if there is an equivalence

RE: Re[4]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-15 Thread Shivshankar Subramani - TLS , Chennai
Hi Teg, Thanks for your snipet! With Regards, SHIVSHANKER S. HCL Technologies Limited, Chennai-600058 Tel: +91-44-43935000 Extn-5029 Mobile-9884656906 Email: [EMAIL PROTECTED] -Original Message- From: Teg [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 7:22 PM To

Re[4]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-15 Thread Teg
Hello Chennai, Wednesday, November 15, 2006, 3:09:08 AM, you wrote: SSTC> Hey I guess you should know more of compression algorithm before u call one SSTC> stupid SSTC> With Regards, SSTC> SHIVSHANKER S. SSTC> HCL Technologies Limited, SSTC> Chennai-600058 SSTC> Tel: +91-44-43935

Re: [sqlite] autoincrement and integer primary key

2006-11-15 Thread Mario Frasca
just a few explainatory notes from me to myself, hoping that they might be useful for the community... again about integer primary key autoincrement, with some details about last_insert_rowid() and sqlite_sequence. --- e

Re: [sqlite] question about search string

2006-11-15 Thread Florin Serbanescu
Thank you for your answer. Indeed is my mistake for doubling the backslash. The query submitted by you did not work on my side. Normally it should work, the similar query in mysql works without any problem, but it seems that sqlite does not interpret it well... Florin. --- [EMAIL PROTECTED] wrote

Re: [sqlite] SQLITE readonly Performance on a CD DB

2006-11-15 Thread drh
[EMAIL PROTECTED] wrote: > I have 300K records in my database and the blob text file (invoices) in = > a separate database. I query the database over a network or USB stick an= > d the performance is good. However when I moved my database to CD media,= > the performance dropped drastically. It tak

Re: [sqlite] question about search string

2006-11-15 Thread drh
Florin Serbanescu <[EMAIL PROTECTED]> wrote: > Hello, > > I have a string that contains a full path of a file > for example. Also I have a table in Sqlite that > contains a column name 'command' that has only the > filename. My question is how I can create a query so I > can retrieve all rows wher

Re: [sqlite] question about search string

2006-11-15 Thread Marco Radaelli
Nevermind, I'm wrong. --- Marco Radaelli <[EMAIL PROTECTED]> ha scritto: > Try > > SELECT * FROM mytable where 'c:\\Program > Files\\a.exe' > like '%command%' > > > --- Florin Serbanescu <[EMAIL PROTECTED]> ha > scritto: > > > Hello, > > > > I have a string that contains a full path of a >

Re: [sqlite] question about search string

2006-11-15 Thread Marco Radaelli
Try SELECT * FROM mytable where 'c:\\Program Files\\a.exe' like '%command%' --- Florin Serbanescu <[EMAIL PROTECTED]> ha scritto: > Hello, > > I have a string that contains a full path of a file > for example. Also I have a table in Sqlite that > contains a column name 'command' that has only

[sqlite] SQLITE readonly Performance on a CD DB

2006-11-15 Thread VisN
I have 300K records in my database and the blob text file (invoices) in a separate database. I query the database over a network or USB stick and the performance is good. However when I moved my database to CD media, the performance dropped drastically. It takes 2 minutes sometime to retreive th

[sqlite] question about search string

2006-11-15 Thread Florin Serbanescu
Hello, I have a string that contains a full path of a file for example. Also I have a table in Sqlite that contains a column name 'command' that has only the filename. My question is how I can create a query so I can retrieve all rows where command field is a substring of my string. In MySQL for e

[sqlite] Sqlite books

2006-11-15 Thread John Gunnarsson
Hi, I'm about to buy a book about Sqlite. I'm coding in C++ so I'm looking for the best book to suite my needs. In my local bookstore I have: The Definitive Guide to SQLite, APress http://www.apress.com/book/bookDisplay.html?bID=10130 and SQLite, Sams http://safari.samspublishing.com/067232685

Re: [sqlite] Handling null characters in blob data

2006-11-15 Thread Vivien Malerba
On 11/13/06, Shivshankar Subramani - TLS , Chennai <[EMAIL PROTECTED]> wrote: Hi all, > SQLite version 2.8 and earlier could not (easily) store binary > data - data with embedded \000 characters. Thus the encode/decode > routines were provide to transform data so that it contained no > \000 cha

RE: Re[2]: [sqlite] Re: Re: Handling null characters in blob data

2006-11-15 Thread Shivshankar Subramani - TLS , Chennai
Hey I guess you should know more of compression algorithm before u call one stupid With Regards, SHIVSHANKER S. HCL Technologies Limited, Chennai-600058 Tel: +91-44-43935000 Extn-5029 Mobile-9884656906 Email: [EMAIL PROTECTED] -Original Message- From: Gussimulator [mail