Re: [sqlite] [sqlite-announce] Foreign key trigger in transactiontriggers wrongly

2008-09-17 Thread Simon Davies
2008/9/17 Bjorn Rauch <[EMAIL PROTECTED]>: >> From: Simon Davies <[EMAIL PROTECTED]>> Date: 2008/9/16> Subject: Re: >> [sqlite-announce] Foreign key . . . . > Yes, indeed it works this way. But I am executing these commands from a .NET > application usin

Re: [sqlite] Update command working from command line but not from a C program

2008-09-16 Thread Simon Davies
2008/9/16 Aravinda babu <[EMAIL PROTECTED]>: > Hi all, > . . . > static const char *updateCmd = "UPDATE cert_store_table set lastRowFlag = > :lastRowFlag where lastRowFlag = :lastRowFlag;" ; > < same named parameter twice > . . . > Is there any

Re: [sqlite] SQL statement to get min/max values

2008-08-15 Thread Simon Davies
Not sure about replacing the collation sequence - does not sound easier than recreating the table. You could just add a view: sqlite> CREATE TABLE test_table (ID INTEGER PRIMARY KEY, ...> ExternalID2 INTEGER, ...> ExternalID INTEGER, ...>

Re: [sqlite] SQL statement to get min/max values

2008-08-15 Thread Simon Davies
Hi Dennis, Declaring the column as integer does not prevent you from storing strings: SQLite version 3.6.0 Enter ".help" for instructions sqlite> BEGIN TRANSACTION; sqlite> CREATE TABLE test_table (ID INTEGER PRIMARY KEY, ExternalID2 INTEGER, ...> ExternalID ...> INTEGER, Value INTEGER); s

Re: [sqlite] db vs shell

2008-07-29 Thread Simon Davies
2008/7/29 Robert Citek <[EMAIL PROTECTED]>: > On Tue, Jul 29, 2008 at 2:35 AM, <[EMAIL PROTECTED]> wrote: >> On Tue, Jul 29, 2008 at 02:29:53AM -0500, Robert Citek wrote: >>> $ sqlite3 -version >>> 3.4.2 >> >> On 3.4.0 and 3.5.9 here, the pure-SQL version is -much- faster than the shell >> pipe. C

Re: [sqlite] Sqlite Endianness

2008-07-25 Thread Simon Davies
2008/7/25 Dave Gierok <[EMAIL PROTECTED]>: > Does anyone know what endianness a Sqlite database is stored in? Or does > that depend on the endianness of the machine it was created on? I am > wondering because we ship a game that runs on Xbox 360, which uses the > PowerPC architecture and has a

Re: [sqlite] sqlite3 basics

2008-07-22 Thread Simon Davies
2008/7/22 Milton Centeno <[EMAIL PROTECTED]>: > Hi, > > I'm new to sqlite. The command "sqlite3 test.db" and "sqlite3 ex1" as listed > in the getting started guide on the website do not appear to work for me. > What are the commands to simply create a database in sqlite and how to exit > when in th

Re: [sqlite] Format of the data

2008-07-22 Thread Simon Davies
2008/7/22 Joanne Pham <[EMAIL PROTECTED]>: > Hi All, > I am current using sqlite 3.5.9 and below is command to get the data from my > database as: > .output '/opt/phoenix/monitor/exportData' > .mode csv > select '#Monitored applications' , group_concat(appName) from appMapTable; > The

Re: [sqlite] Problem with Inner Join

2008-07-14 Thread Simon Davies
2008/7/14 Ralf <[EMAIL PROTECTED]>: > I'm having problems with Inner Joins on m:n relations > > book <--> bookauthor <--> author > > SELECT authorname FROM author INNER JOIN book INNER JOIN bookauthor ON > book.Id_book = bookauthor.Id_book ON author.Id_author = bookauthor.Id_author > WHERE booklti

Re: [sqlite] rtree module crashes

2008-07-04 Thread Simon Davies
Hi Hartwig, You have not specified how you are trying to build SQLite, but if you are trying to build from the amalgamation then this link may be relevant: http://www.nabble.com/-DSQLITE_OMIT_TRIGGER-to18075526.html#a18075989 Rgds, Simon 2008/7/4 Hartwig Wiesmann <[EMAIL PROTECTED]>: > Hi, > > I

Re: [sqlite] counting tables

2008-07-03 Thread Simon Davies
Hi Tim, select count(*) from sqlite_master; will return 0 on a brand new db Rgds, Simon 2008/7/3 Tim Streater <[EMAIL PROTECTED]>: > Hi, > > I have a PHP script that I run in Terminal under OS X, which opens an sqlite > db and works on it. Trouble is, if the db doesn't exist then the PHP libra

Re: [sqlite] NOT LIKE statement

2008-06-25 Thread Simon Davies
n detail? >Thank you. > > James > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Simon Davies > Sent: Wednesday, June 25, 2008 4:40 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] NOT LIKE statement >

Re: [sqlite] NOT LIKE statement

2008-06-25 Thread Simon Davies
entServer. sqlite> Rgds, Simon 2008/6/25 James <[EMAIL PROTECTED]>: > Hi, > I will read that. > But I want to know that is it possible to get the expected result? > Thank you. > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]

Re: [sqlite] NOT LIKE statement

2008-06-25 Thread Simon Davies
Hi James, I think the problem lies with your expectations. Read the section on the LIKE operator in http://www.sqlite.org/lang_expr.html Rgds, Simon 2008/6/25 James <[EMAIL PROTECTED]>: > Hi, > > I execute the SQL statement [SELECT Name FROM tr069;] and get the result > > InternetGatewayDevice.

Re: [sqlite] Ambigous column

2008-06-24 Thread Simon Davies
Christophe, iso is a column in the subquery and in countries. so: select distinct * from (select * from Cities where name like 'dusseldorf%' union select * from Staedte where name like 'düsseldorf%') as sub, countries where sub.iso=countries.iso; Regards, Simon 2008/6/24 Christophe Leske <[EMA

Re: [sqlite] Case-insensitive Glob?

2008-06-20 Thread Simon Davies
Hi Gilles, 'like' is case-insensitive. so: select * from customers where city like "%ville%"; would match "villes" or "VilleS". Rgds, Simon 2008/6/20 Gilles Ganault <[EMAIL PROTECTED]>: > Hello > > Is there a way for glob to be case-insensitive? I'd like to retrieve > all rows where the city

Re: [sqlite] table sqlite_extensions

2008-06-13 Thread Simon Davies
It appears that any table beginning "sqlite_" provokes "SQL error: object name reserved for internal use: sqlite_?" where ? is the text following "sqlite_" The articles you have referenced appear to be discussions of possible future enhancements. Rgds, Simon 2008/6/13 Alexey Pechnikov <[EMAIL PR

Re: [sqlite] Question of reusable rowid

2008-06-13 Thread Simon Davies
http://www.sqlite.org/autoinc.html Rgds, Simon 2008/6/13 Kang Kai <[EMAIL PROTECTED]>: > Hi, > > In an application I use the default 'rowid' column as identifier of objects > stored in table. > > I found that if I delete the record that has the maximal rowid, the rowid > will be reused when I i

Re: [sqlite] sqlite3 command line usage

2008-06-13 Thread Simon Davies
Or in similar vein if you wish the shell to remain running: C:\> sqlite3 tst.db ".read tst.cmd" 2008/6/13 Simon Davies <[EMAIL PROTECTED]>: > Hi John, > > I don't think that the first command can combine meta-commands with > SQL statements. > > But

Re: [sqlite] sqlite3 command line usage

2008-06-13 Thread Simon Davies
Hi John, I don't think that the first command can combine meta-commands with SQL statements. But redirect stdin: C:\> copy con tst.cmd create table if not exists tst( c1 integer ); insert into tst values( 0 ); insert into tst values( 1 ); insert into tst values( 2 ); .mode line select c1 from ts

Re: [sqlite] Extracting distinct category and subcategory pairs

2008-06-09 Thread Simon Davies
Hi Gary, Does SELECT DISTINCT category, subcategory from documents; not provide what you want? If not you may need to be more specific. Rgds, Simon ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/s

Re: [sqlite] SQL question

2008-06-06 Thread Simon Davies
Andrea, This appears to do what you want... SQLite version 3.4.2 Enter ".help" for instructions sqlite> sqlite> create table tst( name text, score integer, info text ); sqlite> insert into tst values( 'A', 289, 'A1' ); sqlite> insert into tst values( 'C', 29, 'C1' ); sqlite> insert into tst value

Re: [sqlite] Speed-Lost on using expression with combined "AND" and "OR"!

2008-06-04 Thread Simon Davies
Hi Markus, http://www.sqlite.org/optoverview.html may help... >From earlier performance discussions, ORs can prevent indices being used - do your tables have indices? Try "EXPLAIN QUERY PLAN " preceding your SELECTs to determine whether indices are being used. Rgds, Simon 2008/6/4 Markus Wolte

Re: [sqlite] Insert date

2008-04-25 Thread Simon Davies
2008/4/25 lrjanzen <[EMAIL PROTECTED]>: > > I have the following table ... > and the following insert > INSERT INTO Sighting (SpeciesID,LocationID,SightingDate,Note) > VALUES (3005,22,'2/26/2008','New Note') > > the insert works EXCEPT the date keeps coming in as NULL! What am I doing > wrong? > >

Re: [sqlite] Concurrency access to SQLite

2008-04-24 Thread Simon Davies
Alexander, >From http://www.sqlite.org/c3ref/busy_handler.html "The presence of a busy handler does not guarantee that it will be invoked when there is lock contention. If SQLite determines that invoking the busy handler could result in a deadlock, it will go ahead and return SQLITE_BUSY or SQLIT

Re: [sqlite] Prepare Statement

2008-02-28 Thread Simon Davies
You need a placeholder in the SQL in order to bind a value. The following is untested but shows the sort of approach... Unsigned char u8_ClassificationCode=1; Unsigned short u16_Input=0x0061; if ( sqlite3_prepare( gpst_SqliteInstance, "SELECT id, Name FROM MUSIC WHERE Name >= '?'

Re: [sqlite] FW: Query to Find number of distinct records

2008-02-27 Thread Simon Davies
Hi Bharath, Works for me in 3.4.2 SQLite version 3.4.2 Enter ".help" for instructions sqlite> create table tst( nun integer, nm text ); sqlite> insert into tst values( 23, 'A' ); sqlite> insert into tst values( 23, 'b' ); sqlite> insert into tst values( 24, 'C' ); sqlite> insert into tst values(

Re: [sqlite] The best way to handle dynamic table creation

2008-02-21 Thread Simon Davies
See "IF NOT EXISTS" in http://www.sqlite.org/lang_createtable.html Rgds, Simon On 21/02/2008, Neville Franks <[EMAIL PROTECTED]> wrote: > I need to create tables on the fly which will persist across sessions. > These tables may or may not already exist. > > Calling sqlite3_exec( "create table ...

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

2008-02-04 Thread Simon Davies
Hi Piotr, Looks fine to me. Isn't 123 the max weight for those rows with name 'C'? Rgds, Simon On 04/02/2008, Piotr Budny <[EMAIL PROTECTED]> wrote: > Hello, > I've got strange behaviour, I want to select row ID of MAX(something) row for > group: > > CREATE TABLE "test" ( "id" INTEGER , "name" C

Re: [sqlite] Variable substitution (TCL & SQLite)

2008-01-18 Thread Simon Davies
On 18/01/2008, Zbigniew Baniewski <[EMAIL PROTECTED]> wrote: > ...and now the contents of $columns (SQL variable) in the statement above, > has been replaced with the contents of $columns (TCL variable) - because the > variable names are "compatible". So - that was my assumption - we've got now: >

Re: [sqlite]:Using sqlite3_progress_handler for GUI application

2007-12-18 Thread Simon Davies
Prob shd be http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor On 18/12/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "Sreedhar.a" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Say,I am having 4 entries in the table ALBUM. > > > > "CREATE TABLE ALBUM (AlbumtId INTEGER PRIMARY KEY NOT NU

Re: [sqlite] Seg fault after calling sqlite3_exec while running under cygwin

2007-12-11 Thread Simon Davies
Hi John, initdb() does not modify the db handle in main(). Call should be: err_c = initdb(&db); and initdb prototype should be int initdb(sqlite3** db) etc... Rgds, Simon On 11/12/2007, John Williams <[EMAIL PROTECTED]> wrote: > I forgot to attach my sample code to my previous mess

Re: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Simon Davies
Hi Doug, I'm guessing that you expect your inserted values to be treated as a date. BUT sqlite> create table foo( d date null ); sqlite> insert into foo(d) values( '2008-01-01' ); sqlite> select d, typeof(d) from foo; 2008-01-01|text http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions may

Re: [sqlite] Doubtful code in os_unix.c

2007-11-29 Thread Simon Davies
See http://www.nabble.com/SQLite-3.5.2---Unix---Memory-issue--tf4851124.html Rgds, Simon On 29/11/2007, Alexandre Balaban <[EMAIL PROTECTED]> wrote: > Hello, > > did someone recently tested the unix code with the locking > style enabled ? > I ask because I saw dubious code in this file, specifica

Re: [sqlite] db crash when creating rows

2007-11-28 Thread Simon Davies
Hi Ged, Compiled your snippet using VS2005 on XP, sqlite 3.4.2 - ran to completion with no errors Rgds, Simon PS Took nrly 2 hrs. Added "BEGIN" and "COMMIT" around insert loop, reduced time to 10 seconds On 27/11/2007, Ged Murphy <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am doing some pr

Re: [sqlite] rollback fails incomprehencibly

2007-11-23 Thread Simon Davies
Hi, Statements will be in progress until you issue an sqlite_reset or sqlite_finalize on them. I don't know why rollback doesn't take care of this; perhaps someone will explain, Rgds, Simon On 23/11/2007, ??? <[EMAIL PROTECTED]> wrote: > Hi all... > > Explain me something please. C

Re: [sqlite] Re: Re: INSERT: how to include CR & LF symbols in a string constant?

2007-11-14 Thread Simon Davies
On 14/11/2007, Jevgenijs Rogovs <[EMAIL PROTECTED]> wrote: > Sounds too complicated for this simple situation... > Can anything be done w/o coding? > Why not change INSERT INTO sometable VALUES ('blablabla\r\nyadayadayada'); into INSERT INTO sometable VALUES ('blablabla yadayadayada'); (real r

Re: [sqlite] Re: A beginner SQL question

2007-11-05 Thread Simon Davies
On 05/11/2007, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > Simon Davies > wrote: > > I use: > > > > select rowid, A, B, C > > from t > > where A||B||C in > > ( select A||B||C > > from t > > group by A, B, C > > having count(*)>1

Re: [sqlite] A beginner SQL question

2007-11-05 Thread Simon Davies
On 05/11/2007, A.J.Millan <[EMAIL PROTECTED]> wrote: > I All: > > Suppose a table: > > CREATE TABLE 'myTable' ( > A INTEGER NOT NULL, > B INTEGER NOT NULL, > C INTEGER); > > Do is there some query to return if there are some duplicate files and/or > who are they? > > Consider duplicate file if ther

Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-29 Thread Simon Davies
On 29/10/2007, Odekirk, Shawn <[EMAIL PROTECTED]> wrote: > Adding "primary key" to column "a" results in the behavior I think you > were first expecting. > > sqlite> create table tmp (a integer primary key, b integer); > sqlite> create unique index tmpIndex on tmp (a, b); > sqlite> insert into tmp

Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-29 Thread Simon Davies
Thanks for the explanation! On 29/10/2007, Dennis Cote <[EMAIL PROTECTED]> wrote: > Simon Davies wrote: > > Following this thread, I was experimenting with last_insert_rowid(), > > and found the following, which does not look right: > > > > SQLite version 3.4.2 &

Re: [sqlite] INSERT OR IGNORE and sqlite3_last_insert_rowid()

2007-10-29 Thread Simon Davies
Hi All, Following this thread, I was experimenting with last_insert_rowid(), and found the following, which does not look right: SQLite version 3.4.2 Enter ".help" for instructions sqlite> sqlite> create table tmp( a integer, b integer ); sqlite> create unique index tmpIndex on tmp( a, b ); sqlit

Re: [sqlite] Re[sqlite] garding converting .db files in SQLite2.1 to SQLite3 version

2007-10-23 Thread Simon Davies
On 23/10/2007, Vijaya Lakshmi <[EMAIL PROTECTED]> wrote: . > sqlite.org and used the command line > > sqlite>sqlite old.db .dump | sqlite 3 new.db > but after this nothing happens it just shows as below... > > Type the command at the operating system prompt, not whilst sqlite is already runnin

Re: [sqlite] Reading error outside the while

2007-10-09 Thread Simon Davies
On 09/10/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > I got an error when I try to read some data outside the while{}, inside the > while{} it's ok, an idea ? > test.db have just one "table1" and a "field1" with values "one", "two", > "three". . . . >const unsigned char *my

Re: [sqlite] Re: Merge two rows/records

2007-10-08 Thread Simon Davies
Hi Daan, You could try this: sqlite> CREATE TABLE foo(a integer, b integer, c integer, d integer, ...> unique (a, b) on conflict ignore); sqlite> CREATE TRIGGER fooUnique before insert on foo ...> when exists (select a from foo where a=new.a and b=new.b) .

Re: [sqlite] Merge two rows/records

2007-10-08 Thread Simon Davies
On 08/10/2007, Daan van der Sanden <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to merge two rows with SQLite? Say I have the following table": > CREATE TABLE foo(a integer, b integer, c integer, d integer); > CREATE INDEX idx ON foo(a,b); > > With the following data: > > INSERT INTO foo VAL

Re: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Simon Davies
On 25/09/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Hi Simon, . . > Here I > need to find the number of distinct combinations of year, month not the > count for a particular year, month. > > Regards, > Phani > SQLite version 3.4.2 Enter ".help" for instructions sqlite> sqlite> create tabl

Re: [sqlite] select COUNT (DISTINCT column1, column2) from table?

2007-09-25 Thread Simon Davies
On 25/09/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: . . > Assume you have a following data: > > matchNo, year, month > > 34 2007 9 > > 27 2006 5 > > 26 2006 5 > > Now distinct year, month will return > > 2007, 9 > > 2006, 5 > > Is there a way by which I ca

[sqlite] 'Misuse of aggregate' reported in subquery which works as a query

2007-09-18 Thread Simon Davies
Hi All, Is this expected behaviour (pre-compiled windows binary)? SQLite version 3.4.2 Enter ".help" for instructions create table monthNames( shortName TEXT, longName TEXT ); insert into monthNames values( 'Jan', 'January' ); insert into monthNames values( 'Feb', 'February' ); insert into monthN

Re: [sqlite] INSERT after creating an INDEX

2007-09-13 Thread Simon Davies
Hi Frank, On 3.4.2 built from amalgamation on XP using Visual Studio I can follow your scenario without problems. I used command line shell and tcl shell. More detail will help (version etc). Rgds, Simon On 13/09/2007, Frank Fiedler <[EMAIL PROTECTED]> wrote: > Hello everybody, > > I have a pro

Re: [sqlite] Re: select round(98926650.50001, 1) ?

2007-09-05 Thread Simon Davies
rather than C++ (it probably was doing that anyway), but again with the same result. Rgds, Simon On 05/09/07, Nuno Lucas <[EMAIL PROTECTED]> wrote: > On 9/5/07, Simon Davies <[EMAIL PROTECTED]> wrote: > [...] > > in sqlite3VdbeMemStringify. > > This resolves down to call

Re: [sqlite] Re: select round(98926650.50001, 1) ?

2007-09-05 Thread Simon Davies
Hi All, Here's my 2p... on XP and VC++ (for my sins!) The round function works. sqlite_column_double() returns 98926650.5 The '01' on the end is introduced by calling sqlite_column_text (in shell.c). This results in reaching the line sqlite3_snprintf(NBFS, z, "%!.15g", pMem->r); in sq

Re: [sqlite] best way to match a date but not a time?

2007-09-02 Thread Simon Davies
On 02/09/07, C M <[EMAIL PROTECTED]> wrote: > Hi, I'm very new to SQLite, and I'm using it with Python. > > I want to have queries that will match dates but not care about times. . . . Hi, If your dates are stored in julian day (real) format, then the fractional part will indicate the time of day

Re: [sqlite] Regenerating ROWID...?

2007-08-31 Thread Simon Davies
On 31/08/2007, Babu, Lokesh <[EMAIL PROTECTED]> wrote: > I was trying the following piece of code (see below), > > The requirement here is very simple, I want the t_id field or ROWID > field to be regenerated sequentially even after delete has been > performed. > Hi Lokesh, You can achieve this

Re: [sqlite] How to generate Unique ID?

2007-08-30 Thread Simon Davies
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Simon, >Yeah you can term the problem like that. Can't I use the > function which is assigning a unique id for INTEGER PRIMARY KEY column > inside sql? If yes, how to use it? > > Regards, > Phani > Phani, With the whole of the s

Re: [sqlite] How to generate Unique ID?

2007-08-30 Thread Simon Davies
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Simon, > > > Without knowing your design, it looks like you wish to be able to > > determine type from the id. This is creating a problem. Can you not > > store the type separately from the id? > > Why is this creating a problem? > No it'

Re: [sqlite] How to generate Unique ID?

2007-08-30 Thread Simon Davies
On 30/08/2007, B V, Phanisekhar <[EMAIL PROTECTED]> wrote: > Hi Simon, >The problem is I have rowid which is the PRIMARY Key, and > another column puid which should be unique. Now when I do vacuum rowid > changes, but puid doesn't change and I don't want puid to change. Now it > is possible

Re: [sqlite] How to generate Unique ID?

2007-08-30 Thread Simon Davies
Hi Phani, What is the point of generating a unique integer separate from the (unique) integer primary key? If you use the primary key as your unique identifier, sqlite will take care of locating unused (deleted) ids when the maximum value is reached (according to the documentation; I have not tri

Re: [sqlite] Re: BestMatch and SqliteStatment Clash

2007-08-29 Thread Simon Davies
ragha, you want something to give you a 'best match'. The 'like' operator in the way you are using it does not do that, but it IS working as it should. I am not sure how to make it any clearer. Rgds, Simon On 29/08/2007, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: > > Hi, > > Pls see my last

Re: [sqlite] BestMatch and SqliteStatment Clash

2007-08-29 Thread Simon Davies
> This email and its attachments contain confidential information from HUAWEI, > which is intended only for the person or entity whose address is listed > above. Any use of the information contained herein in any way (including, but > not limited to, total or partial disclosure, reproduction, or dissemination) > by persons other than the inten

Re: [sqlite] BestMatch and SqliteStatment Clash

2007-08-29 Thread Simon Davies
On 29/08/2007, RaghavendraK 70574 <[EMAIL PROTECTED]> wrote: > > select * from test where '982' like t || '%' order by t desc limit 1; > > This works but will not work for earlier data(9854002656).So seems to be bug. > > regards > ragha '9854002656%' is not a match for '982', so seems not to be a

Re: [sqlite] Newby Question

2007-08-28 Thread Simon Davies
Hi Graham, The trigger needs a where clause, as in the following: sqlite> sqlite> create table temp( id integer primary key, ...> interested integer, ...> val1 text, ...> val2 text, ...>

Re: [sqlite] Sparse matrix

2007-08-22 Thread Simon Davies
Hi Tom, Here's a less gruesome version - no cases. I've given no thought to performance comparisons. C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> insert into List values( 'a' ); sqlite> insert into List values( 'a' ); sqlite> insert int

Re: [sqlite] Sparse matrix

2007-08-22 Thread Simon Davies
Hi Tom, Its a pretty gruesome bit of sql... C:\Joinerysoft\JMS\dev\trunk> sqlite3 tst.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> create table List( Code text ); sqlite> insert into List values( 'a' ); sqlite> insert into List values( 'a' ); sqlite> insert into List values( 'a

Re: [sqlite] Increasing performance of joins with a group by clause?

2007-08-19 Thread Simon Davies
Hi John, > Folks are dumb where I come from; can someone please explain how this > could be correct? I don't know where you come from, so I can't help you. :-) sorry, Simon - To unsubscribe, send email to [EMAIL PROTECT

Re: [sqlite] Dump with where clause

2007-08-17 Thread Simon Davies
Updating Igor's suggestion, just remove 'temp' from the line create temp table image_temp as select * from file_folder_data; For me .dump then works as expected. Rgds, Simon On 17/08/07, Andre du Plessis <[EMAIL PROTECTED]> wrote: > Hi Dennis this seems like a good idea, but there is a problem: >

Re: [sqlite] Delete all other distinct rows

2007-08-08 Thread Simon Davies
Andre, C:\Joinerysoft\JMS\dev\trunk>sqlite3 tst.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> create table tmp( id integer, name text ); sqlite> insert into tmp values( 1, 'some name' ); sqlite> insert into tmp values( 2, 'some name' ); sqlite> insert into tmp values( 3, 'some nam

Re: [sqlite] Best Match Query

2007-08-06 Thread Simon Davies
Hi Ragha, C:\Joinerysoft\JMS\TestArea>sqlite3 tst.db SQLite version 3.4.0 Enter ".help" for instructions sqlite> sqlite> create table tst( c1 integer, c2 test ); sqlite> insert into tst values( 1, '44' ); sqlite> insert into tst values( 2, '442' ); sqlite> insert into tst values( 3, '4454' ); sql

<    1   2   3   4