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@sqlite.org http

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

2012-08-09 Thread Kit
. INSERT INTO mydb (co1, co2) SELECT (SELECT count(*) FROM db1 WHERE sco180), (SELECT count(*) FROM db2 WHERE sco290); -- 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
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 number180; sqlite SELECT * FROM mydb; 2 -- Kit ___ sqlite-users

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

2012-05-14 Thread Kit
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 list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2012-05-09 Thread Kit
-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] 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, March 9, 2010: I have installed both versions. http

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

2012-04-21 Thread Kit
sqlite DROP TABLE foo; sqlite CREATE TABLE foo (myfield TEXT); sqlite INSERT INTO foo VALUES ('255e2555'); sqlite SELECT * FROM foo; 255e2555 sqlite CREATE TABLE foo (myfield VARCHAR); sqlite INSERT INTO foo VALUES ('255e2555'); sqlite SELECT * FROM foo; 255e2555 -- Kit

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 NFS storage. -- Kit

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

2012-04-17 Thread Kit
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
) REFERENCES resource (md5sum) ); CREATE TABLE resource ( md5sum TEXT, data BLOB, primary key(md5sum) ); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo

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

2012-04-16 Thread Kit
=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-users@sqlite.org http://sqlite.org

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 do you represent deleted rows? I

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

2012-04-15 Thread Kit
) 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 SELECT. I mainly work with operations

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

2012-03-14 Thread Kit
...) 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
. 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-12 Thread Kit
,          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://sqlite.org:8080/cgi-bin/mailman

Re: [sqlite] TEXT PRIMARY KEY

2012-03-10 Thread Kit
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 ___ sqlite-users mailing list sqlite-users@sqlite.org http

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 ___ sqlite-users mailing list

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_` in the table? -- Kit

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
. 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-04 Thread Kit
. See Database normalization. You may normalize your table to 3 tables and denormalize to 2 tables. Replace attribute size with attribute version. Primary key first table will be reduced to (filename,version), primary key second table to (md5sum). -- Kit

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
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 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] TEXT PRIMARY KEY

2012-03-03 Thread Kit
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
2012/3/2, Christoph P.U. Kukulies k...@kukulies.org: When defining a column TEXT PRIMARY KEY (is that possible on TEXT?), Yes. would this imply uniqueness? Yes. Or would I have to write something like TEXT PRIMARY KEY UNIQUE ? Christoph Kukulies No. PRIMARY KEY is always UNIQUE. -- Kit

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

2012-02-26 Thread Kit
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
. 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 records. -- Kit ___ sqlite

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

2012-02-13 Thread Kit
); -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite Random number generator

2012-02-11 Thread Kit
)+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] Support EXTRACT SQL standard function

2012-02-11 Thread Kit
is your solution. Write two models. One for MySQL, one for SQLite. These databases are quite different and require different SQL queries. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
. 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-users@sqlite.org http

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 INSERT? Why do you need to do a SELECT

Re: [sqlite] Interpolation

2012-02-08 Thread Kit
) AS b; -- 4.88571428571429 -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Import File with Mixed Delimiters

2012-01-09 Thread Kit
. For example: Net Sales New York 1000.00 999.00 1112.00 Expenses New York 555.00 600.00 500.00 ?php $f = fopen(example.csv, r); $data=fgetcsv($f, 1000, ); print_r($data); ? [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
echo select * from a where field1 REGEXP '$foo'; | /usr/bin/sqlite3 mydb.db /usr/bin/sqlite3 mydb.db EOT select * from a where field1 REGEXP '$foo'; EOT 2012/1/5, Hajo Locke hajo.lo...@gmx.de: Hello List, i use sqlite 3.6.22 Ubuntu 10.04 I want to use REGEXP in my queries but dont find a

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.org:8080/cgi-bin/mailman/listinfo

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

2012-01-04 Thread Kit
','phpsort'); $db-query('UPDATE a SET prdtype=usort(prdtype);'); ? -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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 BY id; -- Kit

Re: [sqlite] Efficient usage of sqlite

2012-01-02 Thread Kit
. -- 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
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
, 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-bin/mailman/listinfo

Re: [sqlite] search

2011-12-27 Thread Kit
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
) 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 update record, use the UPDATE. -- Kit

Re: [sqlite] : about add sqlite database cloumn

2011-12-23 Thread Kit
++; if (price212) tt++; return tt } to put function result into  my table last added cloumn use sqlite in c code? SELECT (price12)+(price21)+(price212) AS tt FROM table; -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org

Re: [sqlite] datetime

2011-12-20 Thread Kit
: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
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 descr LIKE '%emp%'; -- Kit

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 my opinion spending $59 for the Pro

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

2011-11-05 Thread Kit
://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
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 SELECT * FROM test; 1|xx 5|xxx -- Kit ___ sqlite

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

2011-10-25 Thread Kit
? 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 mailing list sqlite

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.org:8080/cgi-bin

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 specific meaning, right? The count(*) function

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
` 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 TABLE/TABLE

2011-08-10 Thread Kit
'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 http://sqlite.org:8080/cgi-bin

Re: [sqlite] Shell doesn't do TABLE/TABLE

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

Re: [sqlite] Shell doesn't do TABLE/TABLE

2011-08-10 Thread Kit
2011/8/10 Simon Slavin slav...@bigfraud.org: However, the tags the shell tool generates are upper case.  There are two possible fixes: a) change the tool to generate lower-case tags. b) change the documentation to say that the tags are HTML, not XHTML. Simon. OK, here is the patch. -- Kit

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

2011-08-09 Thread Kit
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://sqlite.org:8080/cgi-bin/mailman

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

2011-08-09 Thread Kit
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] Text searching

2011-08-06 Thread Kit
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 records (16M records in the index) is in ms. -- Kit ___ sqlite

Re: [sqlite] Strange result using JOIN

2011-07-22 Thread Kit
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 ___ sqlite-users mailing list sqlite

Re: [sqlite] multidimensional representation

2011-07-07 Thread Kit
region I don't think you can delete it and all it's entries cos that would delete everything i.e. I believe you have to leave at least one value in the column whether it be null or north. -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http

[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] 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 or direction

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

2010-07-18 Thread Kit
; 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 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org

Re: [sqlite] Getting a rowid from a view

2010-05-30 Thread Kit
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@sqlite.org http://sqlite.org:8080/cgi-bin

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

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

[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] 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(author TEXT, book TEXT

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 different for indexes, wiews and triggers. -- Kit ___ sqlite-users

Re: [sqlite] SQLite Tools

2009-08-25 Thread Kit
://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
AND ymax; -- 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
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 ___ sqlite-users mailing

Re: [sqlite] Is rowid sequential?

2009-08-21 Thread Kit
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 ___ sqlite-users

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Kit
-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-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080

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

2009-08-20 Thread Kit
?                                pozdrawiam / regards                                                Zbigniew SELECT something FROM table WHERE (col1||';'||col2||...||col20) LIKE '%phrase%' -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi

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/listinfo/sqlite

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

2009-08-19 Thread Kit
|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,temp.data,temp.preult FROM petr4,petr4 AS temp WHERE petr4.rowid=temp.rowid-1; -- Kit

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
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 temp WHERE petr4.rowid=temp.rowid+1; Don't you think

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 column data, John's solution

Re: [sqlite] INSERT with multiple VALUES clause?

2009-08-18 Thread Kit
: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