[sqlite] SQLite and text encoding

2007-02-13 Thread DragonK
Hi, I have a table containing a text field, which is UTF-8 encoded data. I want to know if I use sqlite3_column_text16() to retrieve the contents of the field, would the data be automatically converted to UTF-16, or would the characters be simply extended to 16 bit ? The documentation didn't

[sqlite] Call for Submissions: ICIMP 2007 ICDT 2007 ICGDBC 2007, Silicon Valley, July 1-6, 2007

2007-02-13 Thread Dr. Reda
Call for Submissions: ICIMP 2007 ICDT 2007 ICGDBC 2007, Silicon Valley, July 1-6, 2007 SUBMISSION DEADLINE: FEBRUARY 20 Invitation: Please consider contributing to the conferences ICIMP 2007 , ICDT 2007 and ICGDBC 2007 as well as to the associated workshops listed below. Date: July

[sqlite] SQLite / php - Using REGEXP

2007-02-13 Thread Cecilia VIGNY
Hi, I'm developing a Php program which uses a SQLite database. I want to execute an SQL request : select * from dicsupp WHERE supp regexp 'test'; It doesn't work... What's wrong ? Thank you ! ;) Cécilia. Ce message est protégé par les règles relatives au secret des correspondances. Il

Re: [sqlite] SQLite / php - Using REGEXP

2007-02-13 Thread Michael Schlenker
Cecilia VIGNY schrieb: Hi, I'm developing a Php program which uses a SQLite database. I want to execute an SQL request : select * from dicsupp WHERE supp regexp 'test'; It doesn't work... What's wrong ? Thank you ! ;) There could be all sorts of things wrong. Your SQL code looks correct

Re: [sqlite] SQLite and text encoding

2007-02-13 Thread Dan Kennedy
On Tue, 2007-02-13 at 11:58 +0200, DragonK wrote: Hi, I have a table containing a text field, which is UTF-8 encoded data. I want to know if I use sqlite3_column_text16() to retrieve the contents of the field, would the data be automatically converted to UTF-16, or would the characters be

Re: [sqlite] SQLite / php - Using REGEXP

2007-02-13 Thread drh
Cecilia VIGNY [EMAIL PROTECTED] wrote: Hi, I'm developing a Php program which uses a SQLite database. I want to execute an SQL request : select * from dicsupp WHERE supp regexp 'test'; It doesn't work... What's wrong ? From the documentation, specifically at

Re: [sqlite] SQLite / php - Using REGEXP

2007-02-13 Thread Cecilia VIGNY
[EMAIL PROTECTED] a écrit : Cecilia VIGNY [EMAIL PROTECTED] wrote: Hi, I'm developing a Php program which uses a SQLite database. I want to execute an SQL request : select * from dicsupp WHERE supp regexp 'test'; It doesn't work... What's wrong ? From the documentation,

[sqlite] New (ish) to C== and new to SQLite error with prepare.

2007-02-13 Thread Paul Simpson
Hi, I'm (fairly) new to C++ and also to using dlls and SQLite etc. etc. Ok, so I have a class which represents my database connection. When the open() method is called, it should open the SQLite database. This works. Next, I wnt to use the PRAGMA user_version command to see if the database

[sqlite] Fulltext (php)

2007-02-13 Thread Cecilia VIGNY
Good afternoon, Does anybody have an idea of when the most recent version of SQLite, which supports fulltext indexes, will be integrated with Php ? Have a nice day ;) Ce message est prot?g? par les r?gles relatives au secret des correspondances. Il est donc ?tabli ? destination exclusive

[sqlite] Version 3.3.13

2007-02-13 Thread drh
SQLite version 3.3.13 is now available in the usual place: http://www.sqlite.org/download.html The principal reason for this release is to fix ticket #2211 - the ORDER BY optimization problem. But also included are some new (experimental) features such as the COLLATE operator and the

[sqlite] Re: New (ish) to C== and new to SQLite error with prepare.

2007-02-13 Thread Igor Tandetnik
Paul Simpson [EMAIL PROTECTED] wrote: sqlite3_stmt **ppStmt; const char **pzTail; rc = (sqlPrepareAdd)(newdb, getDBVersion.c_str(),getDBVersion.length(),ppStmt,pzTail); Make it sqlite3_stmt* pStmt; const char* pzTail; rc = (sqlPrepareAdd)(newdb, getDBVersion.c_str(),getDBVersion.length(),

[sqlite] Ticket #2060: Table references enclosed in parenthesis become invisible

2007-02-13 Thread Martin Soto
Hello everyone: I reported this problem (http://www.sqlite.org/cvstrac/tktview?tn=2060) back in November but there doesn't seem to be any progress towards a solution, and the workaround suggested in the ticket doesn't work for me because of the way I generate SQL. I could even try to look into

Re: [sqlite] Version 3.3.13

2007-02-13 Thread snowcrash+sqlite
hi, SQLite version 3.3.13 is now available in the usual place: ... As always, please let me know if you find any problems. building 3.3.13 on osx, all's seemingly well, except the process still fails to build/install one file, % cd /usr/ports/sqlite_build % ls doc/whentouse.html

[sqlite] weird sqlite sum(length())

2007-02-13 Thread Duncan Mac-Vicar Prett
Hi! I have a weird result of sum(length()). have a table called files and a column called name. sqlite select count(name) from files; 2840491 sqlite select count(distinct name) from files; 890373 As you see there are files with the same name. I want to sum the length of the names: sqlite

Re: [sqlite] Re: New (ish) to C== and new to SQLite error with prepare.

2007-02-13 Thread Paul Simpson
Paul Simpson [EMAIL PROTECTED] wrote: sqlite3_stmt **ppStmt; const char **pzTail; rc = (sqlPrepareAdd)(newdb, getDBVersion.c_str(),getDBVersion.length(),ppStmt,pzTail); Make it sqlite3_stmt* pStmt; const char* pzTail; rc = (sqlPrepareAdd)(newdb,

Re: [sqlite] Re: New (ish) to C== and new to SQLite error with prepare.

2007-02-13 Thread Dan Kennedy
On Tue, 2007-02-13 at 16:18 +, Paul Simpson wrote: rc = (sqlStepAdd)(pStmt); rc = (sqlStepAdd)(pStmt); - To unsubscribe, send email to [EMAIL PROTECTED]

RE: [sqlite] Version 3.3.13

2007-02-13 Thread Noah Hart
3.3.13 fails to link with SQLITE_OMIT_TRIGGER defined. Regards, Noah -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of snowcrash+sqlite Sent: Tuesday, February 13, 2007 7:52 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Version 3.3.13 hi,

[sqlite] SQLite-3.3.13

2007-02-13 Thread Rich Shepard
Builds, installs, and works in Slackware-11.0. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.| Accelerator(TM) http://www.appl-ecosys.com Voice: 503-667-4517 Fax: 503-667-8863

[sqlite] Re: Atomically creating a database and bootstrapping its tables

2007-02-13 Thread Steven E. Harris
Dennis Cote [EMAIL PROTECTED] writes: if the user version is not zero ITYM is zero. -- Steven E. Harris - To unsubscribe, send email to [EMAIL PROTECTED]

Re: [sqlite] Atomically creating a database and bootstrapping its tables

2007-02-13 Thread Ron Stevens
No, you have to do that in your application. In pseudo code your create function could do this: open the database file begin an exclusive transaction (since you may need to write to initialize the tables) read the user_version if the user version is not zero create the

RE: [sqlite] Atomically creating a database and bootstrapping its tables

2007-02-13 Thread Noah Hart
Why not create it under a random name, and then rename after creation? Noah Hart -Original Message- From: Ron Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 10:59 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Atomically creating a database and bootstrapping

[sqlite] UPDATE base on certain values

2007-02-13 Thread jose isaias cabrera
Greetings! I would like to be able to update certain columns based on their value. I was looking at ON CONFLICT, but I could not understand it nor I could not find any examples quickly, so I say, heck, that's what the list is for... :-) What I would like is to do something like this,

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread P Kishor
On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: Greetings! I would like to be able to update certain columns based on their value. I was looking at ON CONFLICT, but I could not understand it nor I could not find any examples quickly, so I say, heck, that's what the list is for... :-)

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread jose isaias cabrera
P Kishor wrote, On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: Greetings! I would like to be able to update certain columns based on their value. I was looking at ON CONFLICT, but I could not understand it nor I could not find any examples quickly, so I say, heck, that's what

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread P Kishor
On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: P Kishor wrote, On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: Greetings! I would like to be able to update certain columns based on their value. I was looking at ON CONFLICT, but I could not understand it nor I could

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread jose isaias cabrera
P Kishor wrote, On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: P Kishor wrote, On 2/13/07, jose isaias cabrera [EMAIL PROTECTED] wrote: Greetings! I would like to be able to update certain columns based on their value. I was looking at ON CONFLICT, but I could not

[sqlite] help with syntax

2007-02-13 Thread Anderson, James H \(IT\)
I have the following sybase query (a left join) that I'm having trouble translating into the LEFT JOIN syntax. Any help appreciated. Thanks, jim. create table tmpRR_ML as select b.ratingCodeas ratingCode, a.CDSpreadCurve as CDSpreadCurve from tmpRR a, MasterList b,

Re: [sqlite] Re: Atomically creating a database and bootstrapping its tables

2007-02-13 Thread Dennis Cote
Steven E. Harris wrote: Dennis Cote [EMAIL PROTECTED] writes: if the user version is not zero ITYM is zero. Oops... Yes, you are correct. It should be if the user version is zero. At least I now know somebody is paying attention. :-) Dennis Cote

Re: [sqlite] Atomically creating a database and bootstrapping its tables

2007-02-13 Thread Dennis Cote
Ron Stevens wrote: That solves the problem of two processes bootstrapping the database, but is it possible for the second process to open the database while the first is in the process of creating it (creating the header pages, the system tables, etc) and view the database as corrupt since it

[sqlite] Re: UPDATE base on certain values

2007-02-13 Thread Igor Tandetnik
jose isaias cabrera [EMAIL PROTECTED] wrote: I would like is to do something like this, UPDATE table SET ID = '88' if not = '88', Just have ID = '88' Overwriting a value with the same value is harmless. parent = '1171291314642' if null, parent = ifnull(parent, '1171291314642')

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread Clark Christensen
Maybe coalesce() would work just as well: UPDATE table SET ID = '88', parent = (SELECT CASE WHEN parent IS NULL THEN '1171291314642' END FROM table WHERE ProjID = '88'), .. WHERE ProjID = '88'; becomes: UPDATE table SET ID = '88', parent = coalesce(parent,

Re: [sqlite] UPDATE base on certain values

2007-02-13 Thread Dennis Cote
jose isaias cabrera wrote: So, there is on way of doing it in one call/instruction as I previously exampled, correct? I will have to do them in many calls, correct? Jose, You can do it in one API call if you put all the update statements into a single string. You will probably also

Re: [sqlite] help with syntax

2007-02-13 Thread Dennis Cote
Anderson, James H (IT) wrote: I have the following sybase query (a left join) that I'm having trouble translating into the LEFT JOIN syntax. Any help appreciated. Thanks, jim. create table tmpRR_ML as select b.ratingCodeas ratingCode, a.CDSpreadCurve as CDSpreadCurve from tmpRR a,

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread Martin Jenkins
Build fails on Solaris 9/Ultra5/csw tools Can't find 'ar' so substitutes and attempts to fun 'false' TMP FIX: AR=gar ../configure... corrupt2 tests fail on Solaris 9/Ultra5/csw tools Test file is not actually corrupted (ie altered at all AFAICS) Not sure how many people (outside of

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread Martin Jenkins
Martin Jenkins wrote: Build fails on Solaris 9/Ultra5/csw tools Can't find 'ar' so substitutes and attempts to fun 'false' TMP FIX: AR=gar ../configure... Forgot - fdatasync is in librt so most of the executables need $(TLIBS) added to the end of their recipe. Martin

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread Martin Jenkins
Martin Jenkins wrote: corrupt2 tests fail on Solaris 9/Ultra5/csw tools Test file is not actually corrupted (ie altered at all AFAICS) Exact same failure on a fresh Debian 3.1r4 install too. All other tests passed OK. [EMAIL PROTECTED]:~/dev/sqlite/bld$ uname -a Linux ultra5b

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread drh
Martin Jenkins [EMAIL PROTECTED] wrote: Build fails on Solaris 9/Ultra5/csw tools Can't find 'ar' so substitutes and attempts to fun 'false' TMP FIX: AR=gar ../configure... corrupt2 tests fail on Solaris 9/Ultra5/csw tools Test file is not actually corrupted (ie altered at all

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread Martin Jenkins
[EMAIL PROTECTED] wrote: I get the same problem on OS-X. But it appears to be a bug in the older version of TCL you have installed, not in SQLite It's definitely a bug in Tcl. I'll post the log for posterity and get a newer version. [EMAIL PROTECTED]:~/dev/sqlite/bld$ echo Hello SQLite

RE: [sqlite] help with syntax

2007-02-13 Thread Anderson, James H \(IT\)
Thanks, Dennis, I'll try that. Yes, *= means LEFT JOIN in sybase syntax. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 13, 2007 4:55 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] help with syntax Anderson, James H (IT) wrote: I have the

Re: [sqlite] SQLite-3.3.13

2007-02-13 Thread Martin Jenkins
[EMAIL PROTECTED] wrote: in the older version of TCL you have installed, not in SQLite Hmm. It's definitely a Tcl bug, but I'm not convinced about it being in the older Tcl that I have - the SPARC machine that fails corrupt2.test has a newer version than the PC that passes. [later] I