Re: [sqlite] exists clause in select

2011-08-08 Thread Kees Nuyt
n Sqlite? So you are looking for customers without orders. Try: SELECT customers.id,customers.someothercol FROM customers LEFT OUTER JOIN orders ON orders.cust_id = customers.id WHERE orders.cust_id IS NULL; >regards >W. Canfie

Re: [sqlite] SQLITE_OMIT_UTF16

2011-07-31 Thread Kees Nuyt
ed and un-tared source ( > http://www.sqlite.org/sqlite-src-3070701.zip) will be /src (or C:\src). > > Thank you. > >On Sun, Jul 31, 2011 at 10:46 AM, Kees Nuyt wrote: > >> >> On Sun, 31 Jul 2011 09:54:29 +0300, Baruch Burstein >> wrote: >> >> > Can you refer

Re: [sqlite] SQLITE_OMIT_UTF16

2011-07-31 Thread Kees Nuyt
/www.sqlite.org/amalgamation.html If you need more specific help, please pose more specific questions. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Help needed for SQLite PHP

2011-07-04 Thread Kees Nuyt
Just FYI: James told me in private mail " SQLiteDatabase is not working for sqlite3,  I changed the open script to:  $dbh = new PDO('sqlite:yourdatabase.db'); Now it is working. " On Sun, 03 Jul 2011 16:08:24 +0200, Kees Nuyt wrote: >On Sun, 3 Jul 2011 06:47:26

Re: [sqlite] Help needed for SQLite PHP

2011-07-03 Thread Kees Nuyt
RN: function 'pcntl_fork' not available >20110703:054052 WARN: function 'posix_setuid' not available >  >Do I missed anything? >  >Your help is greatly appreciated! You may have used the wrong interface. Perhaps this example helps: http://php.net/manual/en/intro.sqlite3.

Re: [sqlite] current version support wal mode?

2011-07-02 Thread Kees Nuyt
tatement: PRAGMA jounal_mode=WAL; and then have a look what value PRAGMA jounal_mode; returns. >Thanks >airwolf2026 > > >-- Original -- >From: "Kees Nuyt"; >Date: Sat, Jul 2, 2011 04:52 PM >To: "sqlite-us

Re: [sqlite] current version support wal mode?

2011-07-02 Thread Kees Nuyt
his is to use SQL: PRAGMA jounal_mode=WAL; http://www.sqlite.org/pragma.html#pragma_journal_mode THe query parameters SQLite knows do not include journal_mode: http://www.sqlite.org/uri.html#coreqp -- ( Kees Nuyt ) c[_] ___ sqlite-users mai

Re: [sqlite] How to check foreign keys

2011-06-27 Thread Kees Nuyt
On Mon, 27 Jun 2011 07:13:14 +0200, Cecil Westerhof wrote: >2011/6/26 Kees Nuyt > >> I think Cecil was referring to the fact that some program can >> forget to switch foreign_keys to on, and delete rows that are >> referenced, or change primary keys. >> > >Ye

Re: [sqlite] How to check foreign keys

2011-06-26 Thread Kees Nuyt
id2 INTEGER PRIMARY KEY NOT NULL, id1 INTEGER REFERENCES T1(id1) ON UPDATE CASCADE ON DELETE CASCADE ); Then one could detect missing keys in T1 with: SELECT DISTINCT T2.id1 FROM T2 LEFT OUTER JOIN T1 ON T2.id1 == T1.id1 WHERE T1.id1 IS

Re: [sqlite] Again bug in .indices

2011-06-26 Thread Kees Nuyt
ndices which are created explicitly with a CREATE INDEX statement. .indices tablename will also show the automatically generated indices, needed to implement UNIQUE constraints. I would call this both a feature and a documentation bug ;) -- ( Kees Nuyt ) c[_] __

Re: [sqlite] The last records of a query

2011-06-25 Thread Kees Nuyt
ht ,weights.fat ,weights.water ,weights.muscle FROM weights ,categories WHEREcategories.desc = 'Cecil' AND weights.categoryID = categories.id ORDER BY weights.measureDate DESC LIMIT${SHOW_NUMBER} ) ORDER BY

Re: [sqlite] The last records of a query

2011-06-25 Thread Kees Nuyt
eplace the offset in the LIMIT clause by something like (SELECT COUNT() WHERE ...) It may not apply to your use case, but perhaps it helps anyway: http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor -- ( Kees Nuyt ) c[_] ___ sqlite-users mailin

Re: [sqlite] ^[[A and ^[[B in shell.-

2011-06-19 Thread Kees Nuyt
rom the terminal mode, did you link it with the readline libraries? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to use LIKE wildcards and bound parameters?

2011-06-18 Thread Kees Nuyt
sqlite3_bind_parameter_index(stmt, "%:bp%"), "%bar%", .. Or rewrite the SQL as char *sql = "SELECT * FROM foo WHERE name LIKE '%' || :bp || '%'"; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] can we configure high availibility with SQLITE?

2011-06-11 Thread Kees Nuyt
On Sat, 11 Jun 2011 13:51:43 +0300, irfan khan wrote: > Hi, > > Can we configure high availibility with SQLITE databases like we can do > with other rdbms. No. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sql

Re: [sqlite] can we do recovery for certain time?

2011-06-11 Thread Kees Nuyt
e. Reading the documentation at http://www.sqlite.org/docs.html will give you more insight. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bulk insert performance

2011-05-29 Thread Kees Nuyt
On Sun, 29 May 2011 10:35:51 +1000, "Greg Keogh" wrote: > I'm utterly gobsmacked by the poor performance of the > inserts without a transaction around them. It's a FAQ, http://www.sqlite.org/faq.html#q19 explains the reasons quite clearly.

Re: [sqlite] sqlite3_step hold about 0.5sec in iphone.

2011-05-21 Thread Kees Nuyt
op and calling sqlite3_reset(). This papge might be of interest for you: http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Issue 608 in sqlite-manager: select date('2011-04-29', quote(-3) || 'day'); shows null after upgrading of firefox to 3.6.17

2011-05-08 Thread Kees Nuyt
equires sqlite 3.7.xx, while the version >installed on this system still is 3.6.16. Is that a problem? On many platforms, firefox installs its own libsqlite3.so, e.g. in /usr/lib/mps, so it doesn't require a specific system-wide sqlite3 version. I don't know about this specific Ubuntu / Firefox releases. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Foreign keys bypassed on insert?

2011-04-24 Thread Kees Nuyt
: near line 8: foreign key constraint failed INSERT INTO child SELECT s1 FROM source; Error: near line 9: foreign key constraint failed SELECT * FROM child; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] installing sqlite

2011-04-19 Thread Kees Nuyt
: Install the Firefox web browser from http://www.mozilla.com/en-US/firefox/new/ and add the SQLite manager add-on from https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/ I have no idea wether all that is compatible with Windows NT. Windows XP and later are fine.

Re: [sqlite] Persistently setting certain PRAGMAs (foreign_keys, recursive_triggers)

2011-04-17 Thread Kees Nuyt
in the amalgamation tarball http://www.sqlite.org/sqlite-autoconf-3070601.tar.gz Note: Changing the defaults make your SQL less portable to other SQLite instances. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqli

Re: [sqlite] read full txt file in one record

2011-04-06 Thread Kees Nuyt
sqlite3 $d ; for f in yourfiles* ; do echo "INSERT INTO Files (name,contents) VALUES ('$f',X'$(od -v -A n -t x1 $f|tr -d '\r\n\t ')');" | sqlite3 $d ; done It might not be what you're looking for. -- ( Kees Nuyt ) c[_] _

Re: [sqlite] Insert BLOB data from the command line

2011-03-30 Thread Kees Nuyt
X'$(od -A n -t x1 $f|tr -d '\r\n\t ')');" | sqlite3 $d ; done HTH -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite GUI comparison

2011-02-22 Thread Kees Nuyt
AGMA compile_options; ENABLE_FTS3 ENABLE_RTREE TEMP_STORE=1 THREADSAFE=1 >Thanks, >Tom >BareFeetWare -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread Kees Nuyt
if i remove the order by clause > >See under the "Optional LIMIT and ORDER BY Clauses" heading >on this page: > > http://www.sqlite.org/lang_update.html > >You need to build SQLite with SQLITE_ENABLE_UPDATE_DELETE_LIMIT >defined. > > http://www.sqlite.or

Re: [sqlite] Bi-directional unique

2011-02-12 Thread Kees Nuyt
On Sat, 12 Feb 2011 19:14:51 +, Simon Slavin wrote: > >On 12 Feb 2011, at 11:43am, Kees Nuyt wrote: > >> There are just three cases: >> - i < j >> - i > j >> - i and j are the same. >> >> If j < i just swap the values. > > and gi

Re: [sqlite] Bi-directional unique

2011-02-12 Thread Kees Nuyt
ow you're not fond of triggers because of speed. I don't think this construct will hurt much in this case. You'll have to benchmark it. HTH -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Kees Nuyt
On Thu, 13 Jan 2011 09:44:06 +0100, Kees Nuyt wrote: >or even >SELECT ROWID, > FROM atable ... ; oops, make that or even SELECT ROWID,* FROM atable ... ; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite

Re: [sqlite] How to track a record if the aliased id is changed

2011-01-13 Thread Kees Nuyt
ROWID, FROM atable ... ; and the update would have: UPDATE atable SET WHERE ROWID=$hiddenvalueingrid; You would have to check with PRAGMA table_info(atable) whether or not the special name ROWID is used by a user defined column, and if so, use one of the other special names, i.e. _r

Re: [sqlite] Searchtime in SQL

2010-12-26 Thread Kees Nuyt
g time, why is SQL so slow? is there a way to >improve the speed besides to switch to another database or to develop >an own TXT file on the harddisk? It is certainly possible to make it faster. Mozilla Firefox uses SQLite for the same purpose. You may want to study their code to see how the

Re: [sqlite] SQLite and Windows 95

2010-12-20 Thread Kees Nuyt
Windows95 and avoids newer Windows API calls. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Lock problem opening a Sqlite db on a Samba/CIFS shared disk

2010-12-12 Thread Kees Nuyt
ver instance. http://www.sqlite.org/cvstrac/wiki?p=SqliteNetwork Hope this helps. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] referential integrity, and necessity of a primary key on the one side

2010-12-11 Thread Kees Nuyt
d INTEGER , CONSTRAINT fk_foo_id FOREIGN KEY ( foo_id ) REFERENCES foo (id) ON UPDATE CASCADE ON DELETE CASCADE ); BEGIN; INSERT INTO foo (id,bar) VALUES (1,'bar1'); INSERT INTO fox (dog,foo_id) VALUES ('dog1',last_insert_rowid() ) COMMIT; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Select

2010-12-10 Thread Kees Nuyt
On Fri, 10 Dec 2010 12:57:48 +0100, luuk34 wrote: > > >On 10-12-10 12:43, Kees Nuyt wrote: >> On Fri, 10 Dec 2010 02:53:32 -0800 (PST), lucavb >> wrote: >> >>> Hello, >>> i need to to do this: >>> >>> i have this table: "use

Re: [sqlite] Select

2010-12-10 Thread Kees Nuyt
3) > >How can i do that? > Assuming you mean idtitle where you write "fims": SELECT a.id, a.userid, a.idtitle, a.rate FROM userrates AS a INNER JOIN ( SELECT userid FROM userrates WHERE idtitle IN (1,10) GROUP BY userid HAVING count(id) = 2

Re: [sqlite] like operator

2010-12-10 Thread Kees Nuyt
//www.mail-archive.com/sqlite-users@sqlite.org/msg21791.html (download the zip file and have a look at source file func_exp.c) -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Selecting a group of entries based on RowID.

2010-12-09 Thread Kees Nuyt
some other database: C:\sqlite > sqlite3 mydb.db3 ".dump TABLENAME" | find "INSERT INTO" | your_other_sqltool_and_the_parameters_it_needs -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite-3.7.4 Amalgamation?

2010-12-08 Thread Kees Nuyt
utput to stderr printf "%s is %d.%d.%d.%d\n" "$p" "$v" "$r" "$l" "$d" >&2 # output "the unix way" to stdout printf "%d.%d.%d.%d\n" "$v" &qu

Re: [sqlite] Selecting a group of entries based on RowID.

2010-12-08 Thread Kees Nuyt
p TABLENAME"|grep -e ^INSERT and pipe the result into the database command line tool of the other database. Your requirement "in order" is not satisfied this way, but since you insert the data into another database the order is not impo

Re: [sqlite] Trigger and reference to temporary table - incomplete documentation?

2010-12-06 Thread Kees Nuyt
l, views, triggers, and foreign key constraints can only use objects within the same schema (=database). That makes sense, because SQLite (and you) cannot guarantee the other database file is attached when the view is used, the trigger fires, or the reference is referred. >Oliver -- ( Kee

Re: [sqlite] setting autoincrement value on table with two primarykeys

2010-12-06 Thread Kees Nuyt
On Sun, 5 Dec 2010 19:08:59 -0500, "Igor Tandetnik" wrote: >Kees Nuyt wrote: >> If you need a compound index for performance reasons, you can use >> the autoincrement key as the primary key for the table and define a >> unique index on the compound key. > >

Re: [sqlite] setting autoincrement value on table with two primary keys

2010-12-05 Thread Kees Nuyt
y key for the table and define a unique index on the compound key. Is doesn't serve as a constraint though, because the primary key constraint is more limiting already. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite really SLOW on Solaris?

2010-11-21 Thread Kees Nuyt
osleep(3C) function is preferred over this function. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Using foreign key reference on RowID

2010-11-18 Thread Kees Nuyt
sn't have to be called RowID at all. CREATE TABLE IF NOT EXISTS Tasks ( JobPlan_ID INTEGER NOT NULL REFERENCES JobPlans(id) ON DELETE CASCADE, UID UNIQUE NOT NULL ); -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] append to a column?

2010-11-18 Thread Kees Nuyt
collect all fragment rows with the same identity into one. Interesting to read: http://www.thethirdmanifesto.com/ -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Trouble with TRIGGERS

2010-11-16 Thread Kees Nuyt
On Tue, 16 Nov 2010 14:07:34 -0800 (PST), Bernard Ertl wrote: > > > Nicolas Williams-2 wrote: > > Do you have recursive triggers enabled? > > I'm not sure. How do I check? http://www.sqlite.org/pragma.html#pragma_recursive_trigger

Re: [sqlite] change sqlite table column type

2010-11-15 Thread Kees Nuyt
Until now I thought >that it is just a kind of log for DDL-statements. The table- index- view- and trigger metadata is only stored in the sql column in sqlite_master. It is parsed on every sqlite3_open*(). The in-memory structures you see with PRAGMA table_info() and PRAGMA index_

Re: [sqlite] threads and last_insert_rowid()

2010-11-15 Thread Kees Nuyt
; would be it atomic? or it anyway would suffer >from threads? The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function. So, yes, it suffers from threads if the threads use the same database conne

Re: [sqlite] Question about SQLite features.

2010-11-11 Thread Kees Nuyt
ike SQLite and I am >very committed to its use in my projects.  Many thanks to all who make SQLite >possible.  It is an excellent product.  And the support available through this >mailing list is truly top notch.  I have paid (sometimes dearly) for a >lot less >competent and complete

Re: [sqlite] sqlite3_step to select and update the same table

2010-11-08 Thread Kees Nuyt
xact, and the second is not complete I'm not really tempted to look into it. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_step to select and update the same table

2010-11-07 Thread Kees Nuyt
f FROM table1 WHERE abc = ? );"; prepare(db, delSql, ..., stmt, ...); bind_int(stmt, ..., ghivalue); bind_text(stmt, ..., abcvalue); step(stmt); reset(stmt); finalize(stmt); Hope this helps. -- ( Kees Nuyt ) c[_] __

Re: [sqlite] ODBC Driver

2010-11-06 Thread Kees Nuyt
xecDirect("BEGIN TRANSACTION"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('val11','val21')"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('val12','val22')"); SQLExecDirect("INSERT INTO t (col1,col2) VALUES ('va

Re: [sqlite] Bundling sqlite database together with exe file.

2010-10-24 Thread Kees Nuyt
ite it to disk and open it in the normal way. HTH -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] programmatic way of determining fragmentation?

2010-10-21 Thread Kees Nuyt
uency you intend to run the analysis. That way the time spent to this kind of housekeeping will be about the same. And you could consider PRAGMA auto_vacuum = 0 | NONE | 1 | FULL | 2 | INCREMENTAL; > If no such thing exists, I can build it, but I would > ima

Re: [sqlite] DB access privilege problem...

2010-10-20 Thread Kees Nuyt
hich is not set on your database file) FAT doesn't support ownership, nor ACL's. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to optimize a multi-condition query

2010-10-18 Thread Kees Nuyt
it here. Did you already try to run ANALYZE; on the fully populated database? It gathers statistics about indexes and those are used by the optimizer to choose a query plan. It might not help in your case, but it doesn't hurt to try. >Thanks again and best reg

Re: [sqlite] "multiple" foreign key

2010-10-13 Thread Kees Nuyt
lems, not in the initial design. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SELECT DISTINCT and multi-column UNIQUE constrains

2010-10-10 Thread Kees Nuyt
ly after running ANALYZE; on a fully populated database. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Slow insertion for Unique Text Column

2010-09-25 Thread Kees Nuyt
e I don't see anything fixed that > would resolve the issue. > > Thank you for your help. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] In memory database and locking.

2010-09-09 Thread Kees Nuyt
Finalize at program exit (or not at all). -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] partial index?

2010-08-19 Thread Kees Nuyt
eferences and triggers. Alternatively, you can create an composite index with the "deleted" column as one of the components. >From a theoretical view, if you care about the visibility of a row, you should express it as an attribute of the entity. The solutions above comply with that notion

Re: [sqlite] partial index?

2010-08-19 Thread Kees Nuyt
ique constraints. Anything more is a can of worms indeed. Optional indexes are a codasyl hierarchical or network database feature, where indexes are exposed to the DML. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Documentation for Prev. Versions

2010-08-12 Thread Kees Nuyt
You can clone the repository to your environment and checkout any version, then generate the website of that point in time. The fossil version control system is available here: http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] Incremental row number associated to the current Query?

2010-08-10 Thread Kees Nuyt
counter(line-number) "."; counter-increment: line-number; padding-right: 0.3em; } #. col1col2 val1.1val1.2 val2.1val2.1 val3.1val3.2

Re: [sqlite] Statistics on integer primary key

2010-07-30 Thread Kees Nuyt
m) and analyzing the database both queries >take 0.0. > >Why SQLite does not maintain statistics for rowid indexes? Because the cardinality is known, given that rowid is unique by definition? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] [PHP5-FPM] Sqlite3 or pdo_sqlite?

2010-07-24 Thread Kees Nuyt
_external is only available for MS Windows. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] PRAGMA database_list: insert into table?

2010-07-24 Thread Kees Nuyt
e3meo.ksh unusedids.db3 3.6.23.1 CREATE TABLE integers ( id INTEGER PRIMARY KEY AUTOINCREMENT ); CREATE TABLE test ( id INTEGER PRIMARY KEY NOT NULL, tx TEXT ); table integers: cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|0||1 table test: cid|name|type|notnull|dflt_value|pk 0

Re: [sqlite] Version compatibility

2010-07-24 Thread Kees Nuyt
r is really easy. That should convince him/her. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Kees Nuyt
ddocs/en-us/copy.mspx?mfr=true > >Using /b I stand corrected, thanks for the research. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Very Slow DB Access After Reboot on Windows

2010-07-22 Thread Kees Nuyt
so that >the copy doesn't stop at the first nul byte? > > copy /b my.db nul You are right. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread Kees Nuyt
s, > >josé > >___ >sqlite-users mailing list >sqlite-users@sqlite.org >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to invoke successive SQLite script files

2010-07-15 Thread Kees Nuyt
file path. No. But you can make your script directory the current directory, first: cd /path/to/scriptdir sqlite3 /path/to/database/dbfile /path/to/outfile scriptA: : .read script-B etcetera -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list

Re: [sqlite] How to invoke successive SQLite script files

2010-07-15 Thread Kees Nuyt
with: .output FILENAME and back to the redirection with: .output stdout -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] quickly insert multiple rows into multiple table

2010-07-12 Thread Kees Nuyt
ng e) Give the database as much cache as you can (but not more than the estimated database size) f) fast hardware (especially disks) I think there are a few more suggestions in the wiki on http://www.sqlite.org -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] noobie Is there an additional web site for noobie questions.??

2010-07-12 Thread Kees Nuyt
On Mon, 12 Jul 2010 06:47:55 -0700 (PDT), B H wrote: >also is there a web site or blog for questions and answers in additional to >the email?  Internet Relay Chat: Channel #sqlite on irc.freenode.net -- ( Kees Nuyt ) c[_] ___ sqlite

Re: [sqlite] What is the sqlite3 script suffix?

2010-06-24 Thread Kees Nuyt
but I'm not sure what the most common one in sqlite community. I use .sql for sql scripts, and .db3 for SQLite3 databases. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] [bug] documentation error SELECT statement GROUP BY clause

2010-06-13 Thread Kees Nuyt
/syntax/ordering-term.gif suggests it is possible to specify ASC or DESC, which of course is true for ORDER BY, but not for GROUP BY. Thanks to 'iSteve' on Internet Relay Chat (network freenode.net, channel #sqlite) for bringing this to our attention. -- ( Kees

Re: [sqlite] sql api for ufs

2010-06-07 Thread Kees Nuyt
.fossil-scm.org/index.html/doc/tip/www/index.wiki has a few routines which might be interesting. I know Microsoft does (or tries to do) something similar, perhaps MSDN is of any help? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2010-05-29 Thread Kees Nuyt
ed to allow reserved words as identifiers (table names, column names and the like). -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

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

2010-05-29 Thread Kees Nuyt
owids of its own. That's correct. > Try doing 'SELECT rowid FROM phonebook_order' and see > whether you get any result at all, and whether the numbers are in order. I like the way you invite people to experiment themselves. It's the best way to acquire knowledge. -- (

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

2010-05-29 Thread Kees Nuyt
7;,'104002'); .headers on SELECT rowid FROM phonebook WHERE last_name = 'Smith' AND first_name = 'John'; SELECT * FROM phonebook_order; SELECT COUNT(*) AS roworder FROM phonebook_order WHERE last_name <= 'Smith' AND first_name <= 'John'; >Is there an easier way? Use a counter in your host language. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Doesn't update return wrong code while there isn't record in table?

2010-05-25 Thread Kees Nuyt
sg() returns 'unknown error'. All I can say it is not very useful to call sqlite3_errmsg() on a correct result. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] network access problem

2010-05-24 Thread Kees Nuyt
folders is to copy files to and from virtual machines in an easy way. I think the locking primitives of VBox shared folders are not 100%. You could try again with NFSv4. >Thank you, > >Art Zerger > >azer...@yahoo.com -- ( Kees Nuyt ) c[_] __

Re: [sqlite] Doesn't update return wrong code while there isn't record in table?

2010-05-24 Thread Kees Nuyt
hanges() function. http://www.sqlite.org/lang_corefunc.html -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLITE_CORRUPT: database disk image is malformed

2010-05-12 Thread Kees Nuyt
he reasons could be deletion of a journal after a failed transaction. > a solution to rectify this issue. First make a backup copy of the database file. Try the .dump command in the command line tool. If that doesn't return all your data you can try .dump tablename for every single t

Re: [sqlite] PRAGMA table_info() with database name?

2010-05-09 Thread Kees Nuyt
oo problematic to add sucha feature? As a workaround, you can use: select name from sqlite_master where type='table'; select name from sqlite_temp_master where type='table'; select name from attacheddb.sqlite_master where type='table'; -- ( Kees Nu

Re: [sqlite] SELECT question (computing day of week the usingstrftime() function)

2010-05-06 Thread Kees Nuyt
ery message in this list. Hope this helps. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is it possible to query for database file name ?

2010-05-05 Thread Kees Nuyt
return(FALSE); } } // end __construct() /** * For debugging: tell us when we're done. * Comment out the whole function to suppress. */ function __destruct(){ error_log(__FUNCTION__.' '.$this

Re: [sqlite] INSERT questions

2010-05-05 Thread Kees Nuyt
l1 AS t_col2), col2, ... FROM atable. I think it is your job to do that comparison, not ours. If you find anything irregular you can't understand after consulting http://www.sqlite.org/datatype3.html and http://www.sqlite.org/lang_datefunc.html you can ask that specific question here.

Re: [sqlite] [server] HTTP + SQLite bundled as single EXE?

2010-05-02 Thread Kees Nuyt
you should have a look at fossil (also by drh): http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] changing check constraints

2010-04-29 Thread Kees Nuyt
to recreate indexes and triggers. Usually it's a good idea to write a few "load test data into new schema", or even "unload data from old schema / load data into new schema" scripts when you start a project. -- ( Kees Nuyt ) c[_]

Re: [sqlite] Hypothetical memory consumption question

2010-04-27 Thread Kees Nuyt
t(int) sqlite3_release_memory(int) sqlite3_memory_*() >RobR -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Searching with like for a specific start letter

2010-04-25 Thread Kees Nuyt
sted, but certainly faster than 26 separate queries) >Is there any way to make this query faster? It is taking about 10 >second for 140K entries. > >One idea is to add a column named 'letter' and SELECT COUNT(letter) >from dictionar

Re: [sqlite] Berkeley DB adds SQL using SQLite API !!

2010-03-28 Thread Kees Nuyt
SQL API, based on lo and >behold, SQLite v3 API. What this means is that all tools that work >with SQLite will also work with Oracle Berkeley DB. > >Here is the link to press release: >http://money.cnn.com/news/newsfeeds/articles/marketwire/0599534.htm Interesti

Re: [sqlite] Available alternatives to syntax diagrams in documentation

2010-03-26 Thread Kees Nuyt
ery wordy and not tailored to SQLite. Nicolas Williams suggestion to add alt tags to the images is a good idea. Perhaps the OP, Tyler Spivey, can shine his light on that concept? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlit

Re: [sqlite] unsubsribe plz

2010-03-21 Thread Kees Nuyt
On Fri, 19 Mar 2010 23:53:39 -0500, Ed Sims wrote: >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users >> >Me too please! Just follow the http:// link you quoteed. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing li

Re: [sqlite] Attach a database dynamically if not already available within a trigger

2010-03-16 Thread Kees Nuyt
't be concerned about performance until you really have a performance problem. A healthy schema usually performs well. Design, Build, Benchmark, Optimize, Benchmark. >Thanks -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error in documentation for FOREIGN KEY ?

2010-03-14 Thread Kees Nuyt
constraint is introduced by the FOREIGN KEY keyword. The difference between the two is that a table constraint can (but doesn't have to) use composite keys, consisting of more than one column. >Simon. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Can I add a FOREIGN KEY later ?

2010-03-14 Thread Kees Nuyt
ALTER TABLE can only rename tables or add columns. >Simon. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

<    1   2   3   4   5   6   7   8   9   >