Re: [sqlite] WHERE clause

2008-02-05 Thread Dan
On Feb 6, 2008, at 1:00 PM, Pavel Dedik wrote: > Hi all, > > how can I escape the '%' in where clause? > I suggested the query may look like this: > > *SELECT * from tbl where field LIKE '%\%text'; Try: select * from a where a like '%\%text' escape '\'; Dan. ___

[sqlite] WHERE clause

2008-02-05 Thread Pavel Dedik
Hi all, how can I escape the '%' in where clause? For example: *CREATE TABLE tbl (* *field varchar(30)* *); INSERT INTO tbl VALUES ('first_prefix%text'); **INSERT INTO tbl VALUES ('second_prefixSEPARATORtext'); **INSERT INTO tbl VALUES ('third_prefix%text'); **INSERT INTO tbl VALUES ('third

Re: [sqlite] SQLite 3.5 threading & vfs discussion

2008-02-05 Thread Brad House
Crap, sent the wrong (older/bad) diff... Attached is the right one. Brad House wrote: It appears as though os_unix.c references pthread routines directly when SQLITE_THREADSAFE is defined (and not 0). I think those routines should probably be abstracted like the mutex routines. The problem lie

[sqlite] SQLite 3.5 threading & vfs discussion

2008-02-05 Thread Brad House
It appears as though os_unix.c references pthread routines directly when SQLITE_THREADSAFE is defined (and not 0). I think those routines should probably be abstracted like the mutex routines. The problem lies if an alternate threading implementation is preferred on a unix-like system (as is th

Re: [sqlite] Solaris make test compilation error

2008-02-05 Thread Nicolas Williams
BTW, in Solaris Nevada (build 44) sched_yield() has moved into libc. Which is why SQLite 3.5.5 builds without errors on Solaris Nevada. Auxiliary filters remain in librt so that linking with -lrt will work on all versions of Solaris. Nico -- ___ sqlite

Re: [sqlite] Is it possible to do this using only SQL?

2008-02-05 Thread Luis Esteban Fajardo Bravo
Of course it's possible, it's almost exactly as your pseudo-sql Greetings! Dennis Volodomanov escribió: > Hello all, > > > > I'm not sure if it's possible to do this using only SQL, so I'd like to > ask: > > > > I need to add a column to a table which will be populated with data from > anothe

Re: [sqlite] Mailing List Changes

2008-02-05 Thread John Stanton
[EMAIL PROTECTED] wrote: > Doug Currie <[EMAIL PROTECTED]> wrote: >>> Please set the list so default reply is to the list. >> http://www.unicom.com/pw/reply-to-harmful.html >> > > One finds various screeds such as the one Doug references > above. And on the configuration screen for GNU mailman, >

Re: [sqlite] DBD::SQLite 1.14 prepare_cached bug?

2008-02-05 Thread Clark Christensen
> Conclusion: avoid using $dbh->disconnect() for DBD::SQLite, instead use "undef $dbh". Good info. I don't use usually use prepare_cached(), but I'm adding your observation to my notes for when I'm trying to resolve the same. > What kind of SQL injection is possible here? Good point. Not sure

Re: [sqlite] Select Error - SQL error: unrecognized token: ""select"

2008-02-05 Thread Carl Lindgren
Carl Lindgren wrote: Could someone please give me a clue on why I'm getting this message "SQL error: unrecognized token: ""select" " from the command line using Bash for Dos and a sh script? Thanks for any help, Carl -- Carl Lindgren C. R. Lindgren Consulting / Business on the Desktop Using B

Re: [sqlite] Update value from either database table?

2008-02-05 Thread Stephen Oberholtzer
On Feb 4, 2008 1:56 PM, Gussimulator <[EMAIL PROTECTED]> wrote: > I have a field I need to update given a condition, but I don't know wether > the condition occurs in table A or table B, how can I perform this query? > > I have 2 identical tables in design, but one contains system data and the >

Re: [sqlite] After sqlite3_create_function, calling function returns no such function

2008-02-05 Thread Igor Tandetnik
"Joe Cosby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > rc = sqlite3_create_function16(db, L"TimeToHms", 1, SQLITE_ANY, NULL, > &sqliteTimeToHms, NULL, NULL); > > Which returns SQLITE_OK, then later I have this query > > wstring testSql = L" select TimeToHms(time)" > L" from meta_

Re: [sqlite] Selecting ID for MAX() + GROUP BY

2008-02-05 Thread Piotr Budny
Dnia wtorek, 5 lutego 2008, Gerry Snyder napisał: > P Kishor wrote: > > sqlite> select t.* from test t join (select name, max(weight) as m > > from test group by name) w on t.weight = w.m and t.name = w.name; > [...] > > select * from test join (select name as n, max(weight) as m from test > group

Re: [sqlite] [3.5.4] Fails importing CSV file

2008-02-05 Thread Gilles
Dennis At 11:01 04/02/2008 -0700, Dennis Cote wrote: >You will need to do your import in two steps. First import into a temp >table without the integer primary key column. Thanks a bunch for the explanation and the how-to. The accented characters are displayed funny when SELECTed in the DOS com

[sqlite] Encoding problem indeed...

2008-02-05 Thread Vladimir Mincev
I have found out what is the matter. In SQLite3 encoding works fine (I tried it by manually inserting values thrum SQlite browser - which exclude application error), but in older version of SQLite (which I used for my database by not knowing which version it is) it doesn't work. Since I have read