Re: [sqlite] Logging only SQL commands which make changes, parsing PRAGMAs

2012-08-23 Thread Kit
2012/8/23 Simon Slavin <slav...@bigfraud.org>: > I'm trying to log SQL commands which might make changes to the database, but > not those which just read it... > Simon. Use triggers. -- Kit ___ sqlite-users mailing list sqlite-users@

Re: [sqlite] insert two select count(*) problem

2012-08-09 Thread Kit
t know how to write the sql command. INSERT INTO mydb (co1, co2) SELECT (SELECT count(*) FROM db1 WHERE sco1>80), (SELECT count(*) FROM db2 WHERE sco2>90); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite-users Digest, Vol 56, Issue 5

2012-08-06 Thread Kit
2 VALUES (20,'Name 2'); sqlite> INSERT INTO db2 VALUES (90,'Name 9'); sqlite> INSERT INTO db2 VALUES (140,'Name 14'); sqlite> CREATE TABLE mydb(number1 int); sqlite> INSERT INTO mydb (number1) SELECT count(number1) FROM db2 WHERE number1

Re: [sqlite] Is it possible to insert UTF-8 strings in SQLITE3.EXE?

2012-05-14 Thread Kit
,'M','Ros','10'; sqlite> INSERT INTO PREFIX SELECT x'52C3B373','M','Ros','10'; sqlite> INSERT INTO PREFIX VALUES (x'52C3B373','M','Ros','10'); sqlite> SELECT * FROM PREFIX; Rós|M|Ros|10 Rós|M|Ros|10 Rós|M|Ros|10 -- Kit ___ sqlite-users mailing li

Re: [sqlite] max(userID) .. WHERE userID IS NOT NULL returns NULL But... WHERE <> '' returns value

2012-05-09 Thread Kit
2012/5/9 Petite Abeille <petite.abei...@gmail.com>: > On May 9, 2012, at 9:21 PM, Kit wrote: >> $ sqlite -version >> 2.8.17 > Perhaps the OP got confused between sqlite and sqlite3? :D >> $ sqlite3 -version >> 3.6.23 > Better, but still over two years old

Re: [sqlite] max(userID) .. WHERE userID IS NOT NULL returns NULL But... WHERE <> '' returns value

2012-05-09 Thread Kit
qlite -version 2.8.17 $ sqlite3 -version 3.6.23 openSUSE 11.3 -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error: database is locked on redhat6

2012-04-21 Thread Kit
2012/4/21 田晶 <tianj...@genomics.cn>: > Hi all, > I have a question when using sqlite on redhat6, I put the sqlite file on nfs > storage(this storage is shared by isilion), the client using redhat 6 x64. > Tianjing Never use SQLite on NF

Re: [sqlite] BUG: No reliable way to import strings from a file

2012-04-21 Thread Kit
55e2555'); sqlite> SELECT * FROM foo; 255e2555 sqlite> CREATE TABLE foo (myfield VARCHAR); sqlite> INSERT INTO foo VALUES ('255e2555'); sqlite> SELECT * FROM foo; 255e2555 -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how much "case...when..." command?

2012-04-17 Thread Kit
defaults to 100. You can redefine this limit to be as large as the smaller of SQLITE_MAX_LENGTH and 1073741824. http://www.sqlite.org/limits.html -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] auto-incrementing integer in composite primary key

2012-04-16 Thread Kit
2012/4/16 Petite Abeille <petite.abei...@gmail.com>: > On Apr 16, 2012, at 9:09 PM, Kit wrote: >> SELECT doc.record, t.rec FROM doc LEFT JOIN t ON doc.id=t.doc_id >>      WHERE doc.id=id_xx AND created_on<=time_xx >>      ORDER BY created_on DESC LIMIT 1; > - how

Re: [sqlite] auto-incrementing integer in composite primary key

2012-04-16 Thread Kit
OIN t ON doc.id=t.doc_id WHERE doc.id=id_xx AND created_on<=time_xx ORDER BY created_on DESC LIMIT 1; `id_xx` and `time_xx` are keys for search. You may use some additional indexes. -- Kit ___ sqlite-users mailing list sqlite-use

Re: [sqlite] auto-incrementing integer in composite primary key

2012-04-16 Thread Kit
ame,version), FOREIGN KEY (md5sum) REFERENCES resource (md5sum) ); CREATE TABLE resource ( md5sum TEXT, data BLOB, primary key(md5sum) ); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Why are two select statements 2000 times faster than one?

2012-04-15 Thread Kit
n, > but even "select max(rowid)" is equally slow. > Steinar Why you need "select max(rowid)"? Something is wrong in your data design. Use autoincrement. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How should I get the affected rows' ids

2012-03-26 Thread Kit
UPDATE this_table SET data='abc' WHERE id > 2; SELECT id FROM this_table WHERE id > 2; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] creating virtual tables

2012-03-20 Thread Kit
Create next table with columns min, max, count and create triggers for insert, delete and modification. -- Kit 2012/3/20, Rita <rmorgan...@gmail.com>: > Hello, > > I have a single table which has close to 4 millions rows. I write once and > read many times with SEL

Re: [sqlite] Is there any option that can enable me to do INSERT or UPDATE while SELECT

2012-03-14 Thread Kit
FROM tab2 WHERE ...) WHERE val3 in (SELECT val4 FROM tab4 JOIN tab5 ON ... WHERE ...); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] TEXT PRIMARY KEY

2012-03-12 Thread Kit
     creation_date TEXT,          last_write_time TEXT,          FOREIGN KEY (md5sum) REFERENCES resource (md5sum),          PRIMARY KEY (path,basename,version)          ); You may try s/PRIMARY KEY/UNIQUE/ -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http:/

Re: [sqlite] TEXT PRIMARY KEY

2012-03-12 Thread Kit
rsion of your software, md5sum is changed too. You must replace row in `instance`. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] TEXT PRIMARY KEY

2012-03-10 Thread Kit
KEY, would I have to enable that in SQLite somehow (at > compile time)? > Thanks, > Christoph PRAGMA foreign_keys = ON; in runtime. But you don't need foreign keys support in this case. You may use it for garbage collection. -- Kit ___ sq

Re: [sqlite] UPDATE failure

2012-03-06 Thread Kit
2012/3/6 <a.azzol...@custom.it>: > UPDATE table_name SET IdDeptGroup=1, Gross=Gross+ integer_value  WHERE > Id_= Id_value > > Have you ever seen a mismatch(sum is lower then expected) in the final sum > result ? Missing some `Id_`

Re: [sqlite] What do people think of SQLite Root?

2012-03-06 Thread Kit
> Announcement of the release Sqlite Root <http://www.sqliteroot.com/>  now > available for Linux. > Any feedback is appreciated. > Fabio Spadaro Two big problems: - license - size This software is unusable for me. -- Kit ___ sq

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
ph Foreign key is (basename,md5sum,size). Your example shows that a composite key in this case is possible, but it is not appropriate. Use simple key md5sum. Make two tables. Attribute "size" (part of primary key) is redundant. -- Kit

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
ures being entered? > Christoph "Normalization" is manually process to minimize redundancy and dependency from data structures. See "Database normalization". You may normalize your table to 3 tables and denormalize to 2 tables. Replace attribute "size" with attri

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
t; Christoph If you planning version control system, you may select from completed systems, eg. Subversion, Git, Mercurial and Bazaar. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] TEXT PRIMARY KEY

2012-03-03 Thread Kit
Y(filename,md5sum,size). Filename, version, date and size put to another table with md5sum as a foreign key. Inspire with Git system or use it. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] TEXT PRIMARY KEY

2012-03-02 Thread Kit
Y is always UNIQUE. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to get schema from attached database ?

2012-02-26 Thread Kit
er windows shell command ? > Please help! > Best Regards > tom SELECT sql FROM dbtwo.sqlite_master WHERE type='table'; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] one table versus multiple

2012-02-25 Thread Kit
eady normalized. The primary key is t+user, attribute price is dependent on the entire primary key. No dependency between attributes or between parts of the primary key. However, a problem might occur if the user at the same time wants to make 2 r

Re: [sqlite] How to check whether a table is empty or not in sqlite.

2012-02-13 Thread Kit
LECT exists(SELECT 1 FROM MyTable LIMIT 1); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Support EXTRACT SQL standard function

2012-02-11 Thread Kit
TE); > Unfortunately, strftime isn't a solution. It's not a standard. Function strftime is your solution. Write two models. One for MySQL, one for SQLite. These databases are quite different and require different SQL queries. -- Kit ___ sqlite-u

Re: [sqlite] SQLite Random number generator

2012-02-11 Thread Kit
tnik sqlite> select random()%(10-5)+5; 2 select abs(random()) % (:high - :low) + :low; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
2012/2/10 Simon Slavin <slav...@bigfraud.org>: > On 10 Feb 2012, at 5:32pm, Kit wrote: >> A situation in which I read from the database first and then changes >> the data tells me that they are wrong questions. It is such a problem >> to insert SELECT into UPDATE or

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
ions are committed to the db. A situation in which I read from the database first and then changes the data tells me that they are wrong questions. It is such a problem to insert SELECT into UPDATE or INSERT? -- Kit ___ sqlite-users mailing list sqlite-use

Re: [sqlite] Interpolation

2012-02-08 Thread Kit
2012/2/8 Steinar Midtskogen : > 1. I'd like to be able to look up any timestamp between the oldest and > the newest in the database, and if there is no value stored for that > timestamp, the value given should be an interpolation of the two > closest.  So, if the table has:

Re: [sqlite] Import File with Mixed Delimiters

2012-01-09 Thread Kit
; separated by spaces. For example: > > "Net Sales" "New York" 1000.00 999.00 1112.00 > "Expenses" "New York" 555.00 600.00 500.00 [0] => Net Sales [1] => New York [2] => 1000.00 [3] => 999.00 [4] => 1112.00 -- Kit _

Re: [sqlite] load regexp noninteractive

2012-01-05 Thread Kit
2012/1/5, Hajo Locke <hajo.lo...@gmx.de>: > Hello, > thanks, 2nd is working. > i do in perl now something like: Next time write: "I want it for Perl". -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite

Re: [sqlite] load regexp noninteractive

2012-01-05 Thread Kit
echo "select * from a where field1 REGEXP '$foo';" | /usr/bin/sqlite3 mydb.db /usr/bin/sqlite3 mydb.db <: > Hello List, > > i use sqlite 3.6.22 Ubuntu 10.04 > > I want to use REGEXP in my queries but dont find a way to load the lib in > noninteractive Mode. > There is no -load Parameter for

Re: [sqlite] How to sort within a text field

2012-01-04 Thread Kit
(ID, prdtype) values (2, '15|10|27|3'); > insert into a (ID, prdtype) values (3, '8|6|22'); > > and I'd like to update table 'a' to achieve sorted result in prdtype as ... > Rick PHP experiment: sqliteCreateFunction('usort','phpsort'); $db->query(

Re: [sqlite] How to sort within a text field

2012-01-03 Thread Kit
2012/1/3 Simon Slavin <slav...@bigfraud.org>: > SELECT id,group_concat(type) FROM (SELECT ID, prdtype FROM prds ORDER BY id, > prdtype); > Simon. SELECT id,group_concat(prdtype) FROM (SELECT ID, prdtype FROM prds ORDER BY id, prdtype) GROUP

Re: [sqlite] Efficient usage of sqlite

2012-01-02 Thread Kit
ile system. You can save data in one table, see above. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Efficient usage of sqlite

2012-01-01 Thread Kit
ndependent data that can be otherwise. Best to try both. What count of tables are we talking? Hundreds or thousands are not a problem. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] search

2011-12-27 Thread Kit
me, duration, imagelocation); INSERT INTO virfts4 VALUES ('country1','state1','city1','village1', 0730, 1500,'C'); then use select: SELECT DISTINCT country FROM virfts4; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi

Re: [sqlite] search

2011-12-27 Thread Kit
direct table, dead slow. Send your SQL query and table structure. Maybe you used LIKE instead of MATCH. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] why primary key can changed?Id changed is 2, is bug?(UName is unique)

2011-12-26 Thread Kit
Id is 1 > replace into Unions(UName,Filter) values('a','False')//Changed Id is 2 > why primary key can changed?Id changed is 2,is bug? REPLACE is an alias of INSERT OR REPLACE. http://www.sqlite.org/lang_replace.html The record is inserted, then duplicity is deleted. If you want to up

Re: [sqlite] : about add sqlite database cloumn

2011-12-23 Thread Kit
{ > int tt=0; > if (price1>2) tt++; > if (price2>1) tt++; > if (price2>12) tt++; > return tt > } > > to put function result into  my table last added cloumn use sqlite in c code? SELECT (price1>2)+(price2>1)+(price2>12) AS tt FROM table; -- Kit ___

Re: [sqlite] datetime

2011-12-20 Thread Kit
now','utc') > 2011-12-20 08:05:24            2011-12-20 18:05:24 Try select datetime('now'); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite ordering data from multiple columns

2011-12-02 Thread Kit
first then I will get the Emp Desc Column. So the result should be as > follows. EMP1, EMP2, this is EMP1, this is EMP2. Is it possible to implement > this in one query in Sqlite ??? SELECT id, name FROM emp WHERE name LIKE '%emp%' UNION ALL SELECT id, descr FROM emp WHERE

Re: [sqlite] sql server management studio like tool for SQLite

2011-11-06 Thread Kit
2011/11/5 John Horn <pagemeis...@sbcglobal.net>: > Kit, I've tried many of the tools listed @ > http://www.sqlite.org/cvstrac/wiki?p=ManagementTools. My hands-down vote is > for SQLiteExpert Professional @ > http://sqliteexpert.com/<http://sqliteexpert.com/>. In m

Re: [sqlite] sql server management studio like tool for SQLite

2011-11-05 Thread Kit
ons as SSMS. http://www.adminer.org/ -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unique id

2011-10-27 Thread Kit
st (name) VALUES ('xx'); sqlite> BEGIN; sqlite> UPDATE sqlite_sequence SET seq=seq+3 WHERE name='test'; sqlite> SELECT seq FROM sqlite_sequence WHERE name='test'; 4 sqlite> END; sqlite> INSERT INTO pokus (name) VALUES ('xxx'); sqlite> SEL

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-25 Thread Kit
ible after a creating to generate the aggregated values? For additional search would only use this summary data. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Kit
2011/10/18 Sune Ahlgren <sune_ahlg...@hotmail.com>: > What can I do to make SQLite run safely on CIFS? > /Sune Do not use SQLite on shared device. Use client/server database or client/server front-end of SQLite. -- Kit ___ sqlite-users

Re: [sqlite] Limit COUNT

2011-10-18 Thread Kit
2011/10/16 Fabian <fabianpi...@gmail.com>: > How can you limit a count-query? I tried: > SELECT COUNT(*) FROM table LIMIT 5000 SELECT min(COUNT(*),5000) FROM table; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.

Re: [sqlite] Limit COUNT

2011-10-17 Thread Kit
2011/10/16 Petite Abeille <petite.abei...@gmail.com>: > On Oct 16, 2011, at 10:39 PM, Kit wrote: >>> select count(*) from (select 1 from table limit 5000) >> SELECT count(1) FROM (SELECT 1 FROM table LIMIT 5000); > > you realize that count( * )  has a very specifi

Re: [sqlite] Limit COUNT

2011-10-16 Thread Kit
> select count(*) from (select 1 from table limit 5000) SELECT count(1) FROM (SELECT 1 FROM table LIMIT 5000); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Last record in db

2011-08-23 Thread Kit
> the largest in the table prior to insert. Column `id` is an alias `rowid`, 3rd paragraph: http://www.sqlite.org/lang_createtable.html#rowid -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Shell doesn't do

2011-08-10 Thread Kit
OK, here is the patch. -- Kit diff --git a/src/shell.c b/src/shell.c index a54c922..337f35a 100644 --- a/src/shell.c +++ b/src/shell.c @@ -746,22 +746,22 @@ static int shell_callback(void *pArg, int nArg, char **azArg, char **azCol, int } case MODE_Html: { if( p->c

Re: [sqlite] Shell doesn't do

2011-08-10 Thread Kit
l;> The last output mode is "html". In this mode, sqlite3 writes the results of the query as an XHTML table. XHTML tags are in lowercase... -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Shell doesn't do

2011-08-10 Thread Kit
e of another mode, perhaps 'htmlfull' which does this ? > Simon. Much more I dislike that the tags are uppercase on output. I prefer lowercase, so this functionality can not be used practically. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Maximum number of tables in a data file

2011-08-09 Thread Kit
re easy. > --David Garfield This is not a good idea. It will be very slow. Databases are much more suitable for small blocks of data. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Maximum number of tables in a data file

2011-08-09 Thread Kit
into > a unique-indexed table.  If the insert fails, a duplicate is assumed, > otherwise the new unique key is stored, and the input processed. > Jaco Try Kyoto Cabinet or LevelDB. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http:/

Re: [sqlite] Text searching

2011-08-06 Thread Kit
- 5 words > per name). > Best Regards, > Mohit. I tried to use the Tokyo Cabinet (btree) with very good results. I created a custom index of substrings substring(string, 1)||' '||id .. substring(string, length)||' '||id Time to search in 1M recor

Re: [sqlite] Strange result using JOIN

2011-07-22 Thread Kit
ed ? I not have other column > right for made one ORDER BY and I need to respect the sequence or CODE > table like > Any idea ? > Stefano INSERT INTO ELAB SELECT CODE.* FROM JOB JOIN CODE ON CODE.CODE=JOB.CODE ORDER BY JOB.rowid,CODE.rowid; -- Kit ___

Re: [sqlite] multidimensional representation

2011-07-07 Thread Kit
t; north:1990..1991                                  returning 10,8 select year,sum(value) as total from stat where region="north" and item="sales" group by year; > Once you've created region I don't think you can delete it and all it's > entries cos that would delete ever

Re: [sqlite] VS2010 Issue

2011-05-11 Thread Kit Pat
Sorry I should have added that I converted the project to VS 2010. --- On Wed, 5/11/11, Kit Pat <kitpat1...@yahoo.com> wrote: From: Kit Pat <kitpat1...@yahoo.com> Subject: [sqlite] VS2010 Issue To: sqlite-users@sqlite.org Date: Wednesday, May 11, 2011, 12:56 PM Any help

[sqlite] VS2010 Issue

2011-05-11 Thread Kit Pat
Any help or direction is appreciated.  I have a VS 2005 application using SQLite 1.0.66.0 and Net Framework 2.0.  I'm trying to take the applicaiton to a Windows 7 64 bit machine but not sure what I need to do to convert SQLite to use Net Framework 4.  Is this even possible and how?

Re: [sqlite] create one index on multiple columns or create multiple indexes, each of which is on one column?

2010-07-18 Thread Kit
lue1,value2; > select * from test group by value1||value2; > > For this case, what is the best way to create the index? > -- > Regards, > Peng 1. create index test1 on (value1,value2); create index test2 on (value2); 2. Try EXPLAIN. -- Kit

Re: [sqlite] Getting a "rowid" from a view

2010-05-30 Thread Kit
t_name, > phone_number FROM phonebook ORDER BY last_name, first_name; CREATE VIEW phonebook_order AS SELECT rowid, first_name, last_name, phone_number FROM phonebook ORDER BY last_name, first_name; -- Kit ___ sqlite-users mailing list sqlite-users@sql

Re: [sqlite] BUG in SQLite? Still the rowid question

2009-08-30 Thread Kit
t. sqlite> CREATE VIRTUAL TABLE SimpleFTS USING FTS3 (Name); SQL error: no such module: FTS3 What's FTS3? http://dotnetperls.com/sqlite-fts3 ? Virtual tables are a new feature in SQLite (currently still only available from the development version on CVS) -- Kit _

Re: [sqlite] Insert into 2 tables

2009-08-27 Thread Kit
2009/8/27 Igor Tandetnik <itandet...@mvps.org>: > Or else, create the unique index on authors.author as originally > planned, then use INSERT OR IGNORE to skip over errors. > Igor Tandetnik Super! I lost some hours for finding a solution today. -- Kit CREATE TABLE booklist(au

[sqlite] Insert into 2 tables

2009-08-27 Thread Kit
solution? -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [Delphi] Reading list of tables?

2009-08-26 Thread Kit
2009/8/27 Gilles Ganault <gilles.gana...@free.fr>: > BTW, I noticed that "sqlite_master" has two columns that return the > same thing: What is the difference between "name" and "tbl_name"? It's differen

Re: [sqlite] SQLite Tools

2009-08-25 Thread Kit
r. > Bart http://www.sqlite.org/cvstrac/wiki?p=ConverterTools -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Kit
meter "b", you will have a problem with some pair of points - e.g. [0,0],[0,1]. Better way to save unit squares to file is a simple 2D matrix. No database. Fast and easy for samples with fixed steps of coordinates. You can load entire matrix into memory. -- Kit __

Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Kit
AND x BETWEEN xmin AND xmax AND y BETWEEN ymin AND ymax; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Kit
bble.com/DateTime-comparison-with-custom-format-tp25085040p25085040.html > Sent from the SQLite mailing list archive at Nabble.com. I recomend to convert dateformat to julianday() http://www.sqlite.org/lang_datefunc.html -- Kit ___ sqlite-user

Re: [sqlite] Is rowid sequential?

2009-08-21 Thread Kit
aranteed > sequential in my scenario?  Are the any gotchas I should know about? > Thanks, > John http://www.sqlite.org/autoinc.html cite/ If a table contains a column of type INTEGER PRIMARY KEY, then that column becomes an alias for the ROWID. /cite Yes -- Kit

Re: [sqlite] Copying an open db file

2009-08-20 Thread Kit
2009/8/20 Angus March <an...@uducat.com>: > I want to copy a db file while it is still open, and I'm wondering how > safe that is. .dump -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/lis

Re: [sqlite] Linking all the column fields together (or something like this)

2009-08-20 Thread Kit
ch way? > > Or perhaps there's other, better solution? >                                pozdrawiam / regards >                                                Zbigniew SELECT something FROM table WHERE (col1||';'||col2||...||col20) LIKE '%phrase%' -- Kit _

Re: [sqlite] How to select data from 2 lines in one line?

2009-08-19 Thread Kit
2009/8/19 Mário Anselmo Scandelari Bussmann <mario.bussm...@gmail.com>: > Both work for me, Kit solution is very fast, but I think John is right. In > my case, the tables have sequencial rowid. If I delete some row, then will > not work anymore. When you create an index of colu

Re: [sqlite] How to select data from 2 lines in one line?

2009-08-19 Thread Kit
2009/8/19 John Machin <sjmac...@lexicon.net>: > On 20/08/2009 12:57 AM, Kit wrote: >> Right form (tested): >> >> SELECT petr4.data AS data,petr4.preult AS preult,temp.data AS >> previous_data,temp.preult AS previous_preult >>FROM petr4,petr4 AS te

Re: [sqlite] How to select data from 2 lines in one line?

2009-08-19 Thread Kit
Right form (tested): SELECT petr4.data AS data,petr4.preult AS preult,temp.data AS previous_data,temp.preult AS previous_preult FROM petr4,petr4 AS temp WHERE petr4.rowid=temp.rowid+1; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] How to select data from 2 lines in one line?

2009-08-19 Thread Kit
2007-01-05|46.19|2007-01-04|47.65 > 2007-01-08|46.59|2007-01-05|46.19 > 2007-01-09|45.52|2007-01-08|46.59 > 2007-01-10|45.25|2007-01-09|45.52 > 2007-01-11|45.21|2007-01-10|45.25 > 2007-01-12|45.15|2007-01-11|45.21 > 2007-01-15|44.89|2007-01-12|45.15 SELECT data,preult

Re: [sqlite] INSERT with multiple VALUES clause?

2009-08-18 Thread Kit
RT INTO actor SELECT 1,'PENELOPE','GUINESS','2006-02-15 04:34:33' UNION ALL SELECT 2,'NICK','WAHLBERG','2006-02-15 04:34:33' UNION ALL SELECT 3,'ED','CHASE','2006-02-15 04:34:33'; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users