[sqlite] Compilation error enabling ICU and FTS3, Sqlite 3.6.11, Ubuntu Hardy libicu-dev

2009-03-25 Thread aditya siram
Hi all, I am trying to compile Sqlite with full text search and icu support. I installed libicu-dev from the Ubuntu Hardy repos. I downloaded the amalgamation package [1] and added the icu and fts option to the sqlite3.c file [2]. I now get the following compilation error: gcc -DSQLITE_THREADSAFE=1

[sqlite] Accent Insensitive search

2009-03-24 Thread aditya siram
Hi all, Is there a way to do an accent/diacritic insensitive search in sqlite? For example I want to a query to find " `a blanc " with the search term "a blanc". Thanks ... -deech ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:80

[sqlite] Extraction SQL query from a sqlite3_stmt

2009-02-04 Thread aditya siram
Hi all, Once a sqlite3_stmt has been prepared and variables bound, is there some way of extracting the SQL query? I have a query that runs fine on command line and if I prepare and run it without variables. So something in the way I am binding the variables is returns zero rows. I would like to see

Re: [sqlite] selecting the top 3 in a group

2009-01-07 Thread aditya siram
Hi Robert, SQL has a LIMIT keyword. I have used it to take the top 'x' entries of a large table , so for example: SELECT * from table LIMIT 20 You should be able to use it in your query like so: select div, team, max(wins) from teams group by div limit 5; -deech On Thu, Jan 8, 2009 at 12:06 AM,

Re: [sqlite] Exporting database to CSV file

2009-01-05 Thread aditya siram
Open the sqlite database using: > sqlite3 database.sqlite >> .mode csv >> .output yourfilename >> your-sql -query -deech On Mon, Jan 5, 2009 at 4:21 PM, Jonathon wrote: > Hello all, > > I am interested in exporting a particular table to a CSV file. I've > browsed > google for a bit, but all I

[sqlite] Inserting an image file?

2009-01-02 Thread aditya siram
Hi all, How do I insert an image file into sqlite table? Can I just use a path-specifier? For instance, create table ("name" varchar, "data" blob); insert into table ("someBlob", "./blob.jpg"); thanks, deech ___ sqlite-users mailing list sqlite-users@sql

[sqlite] Named parameters in a glob?

2008-12-16 Thread aditya siram
Is there any way to pass named parameter into a glob pattern, for instance: >SELECT name from name where name glob "*$name*" thanks, deech ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Wildcard searches, partial matches

2008-12-15 Thread aditya siram
Cool! -deech On Mon, Dec 15, 2008 at 12:12 PM, P Kishor wrote: > On 12/15/08, aditya siram wrote: > > Hi all, > > I am trying to implement an autocompleter with a sqlite backend. Is > there a > > way to search the database using wildcards/regexps's without r

[sqlite] Wildcard searches, partial matches

2008-12-15 Thread aditya siram
Hi all, I am trying to implement an autocompleter with a sqlite backend. Is there a way to search the database using wildcards/regexps's without reading the entire search space into memory? For example given the rows: 'hello world' 'goodbye world' a query approximately like "* world" should ret

Re: [sqlite] Adding data with periods

2008-12-14 Thread aditya siram
un, Dec 14, 2008 at 11:21 PM, John Stanton wrote: > Note that literal delimiters in SQL are single quotes, e.g. 'This is an > SQL literal'. > > It is good practice with Sqlite to use bound variables. You avoid > possible SQL injection attacks and limit sensitivity to d

[sqlite] Adding data with periods

2008-12-14 Thread aditya siram
Hi all, I'm having trouble adding data with period characters in it. I tries to escape the period with a `'` but that didn' t seem to work. Here is an example interaction: sqlite> create table test_table ("Contents" varchar); sqlite> insert into test_table "hello . world"; SQL error: near ""hello