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

2012-08-23 Thread Kit
2012/8/23 Simon Slavin : > 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://sqlit

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

2012-08-09 Thread Kit
e 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
;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>80; sqlite> SELECT * FROM mydb; 2

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

2012-05-14 Thread Kit
3' AS TEXT),'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 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 : > 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

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

2012-05-09 Thread Kit
ite3 -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 田晶 : > 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] BUG: No reliable way to import strings from a file

2012-04-21 Thread Kit
gt; > Thanks, I love Sqlite! > > -braddock sqlite> CREATE TABLE foo (myfield STRING); sqlite> INSERT INTO foo VALUES ('255e2555'); sqlite> SELECT * FROM foo; Inf sqlite> DROP TABLE foo; sqlite> CREATE TABLE foo (myfield TEXT); sqlite> INSERT INTO foo VALUES ('

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

2012-04-17 Thread Kit
0. 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 : > 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?

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

2012-04-16 Thread Kit
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
EIGN 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://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2012-04-15 Thread Kit
ot;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 : > 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 l

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
       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://sqlite.org:8

Re: [sqlite] TEXT PRIMARY KEY

2012-03-12 Thread Kit
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
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 ___ sqlite-users mailin

Re: [sqlite] UPDATE failure

2012-03-06 Thread Kit
2012/3/6 : > 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] 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
sename,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 ___ sqlite-users mailing li

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
oph "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 attribute &

Re: [sqlite] TEXT PRIMARY KEY

2012-03-04 Thread Kit
u 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
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
2012/3/2, Christoph P.U. Kukulies : > 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 UNI

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

2012-02-26 Thread Kit
mand ? > 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
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-users mai

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

2012-02-13 Thread Kit
2012/2/13 Igor Tandetnik : > bhaskarReddy wrote: >>        How to check whether a table is empty or not. If a table is empty, i >> want to do some logic. If not another logic. > > select exists (select 1 from MyTable); SELECT exists(SELECT 1 FROM MyTa

Re: [sqlite] Support EXTRACT SQL standard function

2012-02-11 Thread Kit
x27;%Y',CURRENT_DATE); > 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

Re: [sqlite] SQLite Random number generator

2012-02-11 Thread Kit
; 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 : > 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

Re: [sqlite] Database locked in multi process scenario

2012-02-10 Thread Kit
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://sqlite.org:

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: > > 1325376000 (Jan 1 20

Re: [sqlite] Import File with Mixed Delimiters

2012-01-10 Thread Kit
nk of anything else, perhaps modify SQLite shell or modify input data by some filter. -- 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
ample: > > "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 ___ s

Re: [sqlite] load regexp noninteractive

2012-01-05 Thread Kit
03/01/sqlite-examples-with-bash-perl-and-python/ -- Kit ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] load regexp noninteractive

2012-01-05 Thread Kit
2012/1/5, Hajo Locke : > 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/mail

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 sqlite

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

2012-01-04 Thread Kit
s (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 : > 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 ___ sql

Re: [sqlite] Efficient usage of sqlite

2012-01-02 Thread Kit
of files. I know this is not a lot, but it still bothers me, like what > when I have a game with 500M of files? (you never know, it may happen!). No > searching is needed (except once for the key to load a resource) Such data in SQLite take up less space than in the file system. You can s

Re: [sqlite] Efficient usage of sqlite

2012-01-01 Thread Kit
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
on); 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/sqlite-users

Re: [sqlite] search

2011-12-27 Thread Kit
end 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
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 dupli

Re: [sqlite] : about add sqlite database cloumn

2011-12-23 Thread Kit
;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
#x27;,'localtime')    datetime('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] union-having bug

2011-12-03 Thread Kit
, sum(bar) barr from (select 1 ind, 0 foo, 1 bar union select 1 ind, 1 foo, 0 bar) group by ind having barr >0; 1|1|1 -- 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
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 W

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

2011-11-06 Thread Kit
2011/11/5 John Horn : > 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

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

2011-11-05 Thread Kit
2011/11/4 David Hubbard : > Is there any tool for SQLite like sql server management studio? We are > looking at using SQLite and I have no > expireince with it but would like an easy to use tool to use with > SQLite that can perform the same functions as SSMS. http://www.adminer.

Re: [sqlite] Unique id

2011-10-27 Thread Kit
;); 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> SELECT * FROM test; 1|xx 5|xxx --

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

2011-10-25 Thread Kit
tables also constant, it is possible 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 : > 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-users@sqlite.or

Re: [sqlite] Limit COUNT

2011-10-18 Thread Kit
2011/10/16 Fabian : > 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/mailman/li

Re: [sqlite] Limit COUNT

2011-10-17 Thread Kit
2011/10/16 Petite Abeille : > 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? > &quo

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
rior 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
2011/8/10 Simon Slavin : > 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. -- Ki

Re: [sqlite] Shell doesn't do

2011-08-10 Thread Kit
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
ther 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 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
s 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
f 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/mailm

Re: [sqlite] Text searching

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

Re: [sqlite] Strange result using JOIN

2011-07-22 Thread Kit
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 s

Re: [sqlite] multidimensional representation

2011-07-07 Thread Kit
                                 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 everything

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 wrote: From: Kit Pat Subject: [sqlite] VS2010 Issue To: sqlite-users@sqlite.org Date: Wednesday, May 11, 2011, 12:56 PM Any help or direction is appreciated.  I have a VS 2005 application using

[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
elect * 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 ___ sqlite-users mai

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

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

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

2009-08-30 Thread Kit
lite> 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 : > 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); CRE

[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 : > 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

Re: [sqlite] SQLite Tools

2009-08-25 Thread Kit
.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
ill 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 ___ sqli

Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Kit
ne. > I can, of course create a query for each point along the line, but this will > be very time consuming as I have hundreds of lines with hundreds of points. > Any suggestions? > Thanks, Itzik SELECT x,y,height FROM terrain WHERE round(a*x+b*y+c)=0 AND x BETWEEN xmin AND xmax AND y BET

Re: [sqlite] DateTime comparison with custom format

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

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-u

Re: [sqlite] Copying an open db file

2009-08-20 Thread Kit
2009/8/20 Angus March : > 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-users

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

2009-08-20 Thread Kit
ere exist any possibility to make it such way? > > Or perhaps there's other, better solution? >                                pozdrawiam / regards >                                                Zbigniew SELECT something FROM table WHERE (col1||';'||col2||...||col20) LIKE '%phrase%' --

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 : > 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 wi

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

2009-08-19 Thread Kit
2009/8/19 John Machin : > 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

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
t; 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,temp.

Re: [sqlite] INSERT with multiple VALUES clause?

2009-08-18 Thread Kit
SQLite insert > to accept multiple VALUES arguments? INSERT 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