Re: [sqlite] UNIQUE constraint on column

2007-01-31 Thread Kees Nuyt
ery for the sake of speed... especially since the >value I needed was so tantalizing close in the VDBE struct. The SELECT will be quite fast, chances are the required pages of the unique index will still be in the cache. In my opinion it is always better to write portable code, so I would prefer to rely on generic SQL than on yet another implementation specific API. Just my 2 cents. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Equivalent syntax?

2007-01-31 Thread Kees Nuyt
On Wed, 31 Jan 2007 18:31:20 -0500, you wrote: >Is cast documented on the sqlite website? I couldn't find it. http://www.sqlite.org/lang_expr.html -- ( Kees Nuyt ) c[_] - To unsubscribe, send email t

Re: [sqlite] Equivalent syntax?

2007-01-31 Thread Kees Nuyt
On Wed, 31 Jan 2007 17:30:29 -0500, you wrote: >BTW, what is the concatenation operator? Standard SQL: string || string -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Function question

2007-02-01 Thread Kees Nuyt
nsion(X,Y) can be used in the command line program. I usually postprocess output by piping it through awk to solve these kinds of problems. sqlite3 databasefile outfile >jim HTH -- ( Kees Nuyt ) c[_] - To unsub

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-06 Thread Kees Nuyt
ot sure if there >will be future releases of this or not) -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Is there a SQLiteSpy-like thing that will let me change data from a grid?

2007-02-07 Thread Kees Nuyt
g database, try to create a new one from sqlite3explorer. I use it in combination with sqlite3.dll, version 3.3.12, without any problem. I downloaded it 2006-03-13 and it still works well. -- ( Kees Nuyt ) c[_] - T

Re: [sqlite] How do I get MATCH and REGEXP

2007-02-09 Thread Kees Nuyt
implement the REGEXP operator. The MATCH operator is a special syntax for the match() user function. The default match() function implementation raises and exception and is not really useful for anything. But extensions can override the match() function with more helpful logic." >Regards,

Re: [sqlite] How do I get MATCH and REGEXP

2007-02-10 Thread Kees Nuyt
/Extension-functions-for-SQLite-in-C-for-free-tf3182921.html#a8833684 >Regards, >Rick van der Lans > >-----Oorspronkelijk bericht- >Van: Kees Nuyt [mailto:[EMAIL PROTECTED] >Verzonden: Friday, February 09, 2007 10:55 PM >Aan: sqlite-users@sqlite.org >Onderwerp: Re: [sql

Re: [sqlite] Problem with .import

2007-02-10 Thread Kees Nuyt
#x27;Habitats','','External','x >100','Centroid',0,100,0.2,'Strong','Fuzzy Space','Minimum','Min-max'); > > There are 14 fields and no extra space trailing t

Re: [sqlite] How do you combine two SQLite databases?

2007-02-17 Thread Kees Nuyt
>>fileall.sql sqlite3 database3 http://www.sqlite.org/sqlite.html >Thanks! Hope this helps. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] data type problem

2007-03-22 Thread Kees Nuyt
stay keywords shouldn't be quoted at all. If you choose your columnnames carefully (not contained in the collection of reserved words), the [] could easily be filtered out with sed or awk. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Query Issue

2007-03-22 Thread Kees Nuyt
|1 2|file1|0|2007-03-01|2007-03-02|2|2 2|file1|0|2007-04-01|2007-04-02|2|2 I don't know if it makes sense, but in sqlite-3.3.13 I didn't get the error you mentioned. Just guessing: In earlier version of sqlite the alias e can't be used in the subselect, in other words: Support

Re: [sqlite] Vista problem on its aggressive "previous version"

2007-04-25 Thread Kees Nuyt
ands on experience with Vista... Perhaps you should install the software in directories outside the ones "guarded" by Vista. I think "Program Files" and "Windows" aren't safe anymore for people who want to be in control themselves. &

Re: [sqlite] Recovery After Crash

2007-06-17 Thread Kees Nuyt
, webbrowsers (Firefox), embedded systems like PDA's, mp3 players etcetera. These are all enviroments where the users 1) aren't especially careful 2) aren't willing or able to handrecover a database. They even don't know it's there. -- ( Kees Nuyt ) c[_] -

Re: [sqlite] Trigger update of multiple columns

2007-06-18 Thread Kees Nuyt
NEW.product_id ) WHERE ... See also: http://www.sqlite.org/cvstrac/wiki?p=UnsupportedSql item 2005.10.06 -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Data structure for versioned data

2007-06-21 Thread Kees Nuyt
e 2 version 2' WHERE nkey == 2; UPDATE notes SET msg = 'note 1 version 3' WHERE nkey == 1; -- queries SELECT * FROM sh_audit; SELECT * FROM sh_status; SELECT 'notes'; SELECT * FROM notes; SELECT 'audit'; SELECT * FROM audit; SELECT 'audit with timediff'; SELECT * FROM sh_audit; >Thanks, > >Sam > I hope this helps. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Question about triggers

2007-06-28 Thread Kees Nuyt
tion. 4) Triggers can't be forgotten, so the stamping will be more consistent, much like constraints. As a side note, I seem to remember all sqlite timestamps within a transaction have the same value: the time at BEGIN TRANSACTION. To me that is the most importan

Re: [sqlite] Compiling for Classic VB?

2007-07-14 Thread Kees Nuyt
sing a web interface, http://www.mail-archive.com/sqlite-users@sqlite.org/ might suit your needs. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] How do I unsubscribe?

2007-07-24 Thread Kees Nuyt
e of this email is >prohibited when received in error. Exactly the way it says in about every message: - To unsubscribe, send email to [EMAIL PROTECTED] --

Re: [sqlite] SQLite.org needs online forms

2007-08-03 Thread Kees Nuyt
prefer to have all info pushed to me. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Update Columns in One Table Using Values From Another Table

2007-08-23 Thread Kees Nuyt
not just the ones to be updated. That is exactly what INSERT OR REPLACE does. http://www.sqlite.org/lang_insert.html http://www.sqlite.org/lang_conflict.html >Chris -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Update Columns in One Table Using Values From Another Table

2007-08-23 Thread Kees Nuyt
On Thu, 23 Aug 2007 14:15:00 -0400, you wrote: >On Thu, 23 Aug 2007 18:58:32 +0200, Kees Nuyt wrote: > >>Hi Chris, > >>On Thu, 23 Aug 2007 12:14:51 -0400, you wrote: > >>>On Thu, 23 Aug 2007 08:52:40 -0700, Gerry Snyder wrote: >>> >>>>Wi

Re: [sqlite] Skype client using SQLite?

2007-08-28 Thread Kees Nuyt
DVBT_Frequency DVBT_FrequencyTable DVBT_FrequencyTableToFrequency DVB_IPService Version Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Skype client using SQLite?

2007-08-28 Thread Kees Nuyt
[snip] > My own Skype installation doesn't show any trace of SQLite. > Either they don't use it, or they've hidden it very well. Oops, found it: C:\Users\\AppData\Roaming\Skype\\dyncontent\bundle.dat -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] CURRENT_TIMESTAMP value in single transaction

2007-08-28 Thread Kees Nuyt
synthetic key for both in the application. > Thanks in advance > Nick Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] How to generate Unique ID?

2007-08-30 Thread Kees Nuyt
OWID is created [snip] Note: this solution is not standard SQL and not portable. For more or less protable solution you would have to use smart trigger code. Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Performance tuning for Insert and select operations

2007-09-01 Thread Kees Nuyt
loading, sort your input in key order. 4) Tune your operating system and file system. 5) Adjust hardware. Good luck -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] remote access to sqlite db?

2007-09-03 Thread Kees Nuyt
ite.org/contrib sqlite-networked >Thanks, >Mark Hope this helps. Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] why a VIEW doesn't contain a ROWID

2007-09-03 Thread Kees Nuyt
It is easy to materialize that number in any language you will use around your SQL, even in a shell: sqlite3 your.db "select * from testTbl;" | \ awk -v OFS='|' '{print NR,$0}' 1|1|d1 2|3|d3 3|4|d4 note: \ is linewrap Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

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

2007-09-03 Thread Kees Nuyt
0001 sqlite> select round(98926650.50001 -0.01, 1); 98926650.501 sqlite> select round(98926650.50001 -0.1, 1); 98926650.4 sqlite> Oh, well, 9 digits of accuracy is way more than most measurements we can do in daily life. For money, use integers and express in cents / centimes or something. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

[sqlite] BigNameUsers: Nokia using SQLite in PCsuite

2007-09-03 Thread Kees Nuyt
27;; Pictures: http://www.forum.nokia.com/devices/pics/6233_main.jpg http://www.nokia.com/search/images/logo_nokia_115_40.gif (I didn't find a real good one) -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] why a VIEW doesn't contain a ROWID

2007-09-03 Thread Kees Nuyt
ROWID,t_name FROM testTbl; 1|d1 2|d2 3|d3 4|d4 DELETE FROM testTbl WHERE t_name='d2'; SELECT ROWID,t_name FROM testTbl; 1|d1 3|d3 4|d4 same picture.. Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Eliminate duplicate entries

2007-09-04 Thread Kees Nuyt
ne a separate table constraint UNIQUE (on,all,columns) ON CONFLICT IGNORE. The insert will fail. It depends on the conflict-clause what happens. Or you can use INSERT ... ON CONFLICT IGNORE. http://www.sqlite.org/lang_conflict

Re: [sqlite] Eliminate duplicate entries

2007-09-04 Thread Kees Nuyt
On Tue, 04 Sep 2007 09:20:28 -0700, Gerry wrote: >Kees Nuyt wrote: >> On Tue, 04 Sep 2007 07:53:08 -0600, Scott wrote: >> >>> I have an application that is inserting a record every second. There >>> are thousands of periods from a few seconds to hours lo

Re: [sqlite] ColType lost

2007-09-05 Thread Kees Nuyt
n every row you sqlite3_step() into. -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] New Operator Support

2007-09-07 Thread Kees Nuyt
com/sw/lemon/ http://www.sqlite.org/datatype3.html Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] sqlite in memory

2007-09-12 Thread Kees Nuyt
Not without the server mechanism. The performance gain of a :memory: database is limited, one of the reasons is that most operating systems will cache the database file in memory anyway. In general: when you really need a DB server, don't use SQLite. http://www.sqlite.org/whentouse.html &

Re: [sqlite] multi column select

2007-09-12 Thread Kees Nuyt
s with t=111 and then do a > search for b=222 with in that set or other way? Perhaps you will find an explanation here: http://www.sqlite.org/optoverview.html Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Converting sqlite2 to sqlite3

2007-09-12 Thread Kees Nuyt
the command line tool. http://www.sqlite.org/download.html Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Sqlite insertion performance

2007-09-14 Thread Kees Nuyt
s the best next thing to do either. > >Your feedback and input will be highly appreciated, > >- Kefah. Most probably the UNIQUE INDEX on the TEXT column is the culprit. My first try would be to create and fill the table first, a

Re: [sqlite] Sqlite insertion performance

2007-09-15 Thread Kees Nuyt
nks again, >- Kefah. Good luck. >On Saturday 15 September 2007 00:25:03 Kees Nuyt wrote: >> On Fri, 14 Sep 2007 23:20:53 +0300, you wrote: >> >Dear All, >> > >> >I have been struggling with the performance of insertion in sqlite. >> > >> >Here we

Re: [sqlite] Primary Keys of a table

2007-09-18 Thread Kees Nuyt
person_id INTEGER 99 1 1 name TEXT 99 0 2 dtstampDATETIME 0 CURRENT_TI 0 -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] DBIException: The name 'bdate' is not a valid index.

2007-09-20 Thread Kees Nuyt
s is that try to sum strings, bcz the colums aren't defined as numeric in the table definition. >thanks, > >josé Hope this helps, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] multiple databases

2007-09-20 Thread Kees Nuyt
been initialized before, and if not, define a proper schema. The class methods for receiving messages could contain sqlite3 calls that use the database in some way. You have to take care that every database should have a unique filename, and that a specific node in the simulated network uses t

Re: [sqlite] Formatting numbers

2007-09-20 Thread Kees Nuyt
gt; >$123.40 > >Is there a better way? I can't see any number formatting function in >SQLite's repertoire. Round comes closest, but is not exacly what you need. select '$' || round( Amount ,2) from Invoice; Two remarks: Formatting and presentation is usually considered a tas

Re: [sqlite] Precompiled 2.x for Windows?

2007-09-20 Thread Kees Nuyt
plication I'm trying > to support. > Thank you to anyone who might be able to provide this for me. It's on the bottom of the download page: http://www.sqlite.org/download.html -- ( Kees Nuyt ) c[_] -

Re: [sqlite] sqlite3_open_v2 and SQLITE_OPEN_READONLY

2007-09-20 Thread Kees Nuyt
On Thu, 20 Sep 2007 13:57:58 -0400, Liam wrote: > It would be nice if the documentation gave a > brief indication when a feature is added > ("new in 3.5.0" unobtrusively somewhere). Like in http://www.sqlite.org/34to35.html ? --

Re: [sqlite] Precompiled 2.x for Windows?

2007-09-20 Thread Kees Nuyt
checked. The link isn't on the page anymore, but (as with many old versions) the download is still available: http://www.sqlite.org/sqlitedll-2_8_17.zip I'm glad you managed to compile it by yourself. -- ( Kees Nuyt ) c[_] -

Re: [sqlite] Sqlite occasionally becomes CPU greedy

2007-09-24 Thread Kees Nuyt
pages of 512 bytes to accomodate 3.5 MByte. Ideally, the page_size should equal the allocation unit (for Window: the cluster size of the formatted disk). Also, if your rows can be large, a too small page_size would cause overflow pages, and thus additional overhead

Re: [sqlite] Sqlite occasionally becomes CPU greedy

2007-09-24 Thread Kees Nuyt
On Mon, 24 Sep 2007 10:35:51 -0700, you wrote: >Kees Nuyt wrote: >> On Mon, 24 Sep 2007 07:13:51 -0700, Gururaja Nittur wrote: >> >> >>> Sqlite experts, >>> >>> I am running Sqlite version 3.4.1. I ran some performance tests and >>> obs

Re: [sqlite] Sqlite occasionally becomes CPU greedy

2007-09-25 Thread Kees Nuyt
On Mon, 24 Sep 2007 21:36:14 -0700, Gururaja Nittur wrote: >On 9/24/07, Kees Nuyt <[EMAIL PROTECTED]> wrote: >> >> On Mon, 24 Sep 2007 10:35:51 -0700, Gerry Snyder wrote: [big snip] >> >I'm confused. With a bunch of INSERTs per transaction, the CPU usage can

Re: [sqlite] Index size in file

2007-10-04 Thread Kees Nuyt
'franklin' as (5,lin), meaning: take the first five characters of the previous key and concatenate the rest. - store 'fred' as (2,ed) - store 'google' as (0,google) - store 'gopher' as (2,pher) This works nicely for la

Re: [sqlite] Problems with SQLite and PHP

2007-10-04 Thread Kees Nuyt
QLite library 3.4.2 The only thing i can think of (wild guess) is your php-cli uses another php.ini than the Apache module does. Good luck ! -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] step back

2007-10-05 Thread Kees Nuyt
ckward pointers in order to do it.) >> > >This issue keeps coming up so I did a wiki page. >http://www.sqlite.org/cvstrac/wiki?p=ScrollingCursor A true gem! -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] many-one relation

2007-10-08 Thread Kees Nuyt
age earlier > >-x- >Chetana This might be of help: http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator -- ( Kees Nuyt ) c[_] ---

Re: [sqlite] auto library function loading

2007-10-09 Thread Kees Nuyt
t_id INTEGER PRIMARY KEY, t_name TEXT ) SQLite version 3.4.2 Enter ".help" for instructions sqlite> Hope this helps. Regards, -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Making BEGIN IMMEDIATE the default.

2007-10-11 Thread Kees Nuyt
of these details automatically." And this is about the TCL transaction {} method. >You might want to be a little bit more clear about the fact that [transaction] >nests even though BEGIN does not. The TCL transaction{} can be nested, the SQL BEGIN can't. As

Re: [sqlite] Making BEGIN IMMEDIATE the default.

2007-10-12 Thread Kees Nuyt
On Fri, 12 Oct 2007 01:00:32 -0500, you wrote: >On Thu, 11 Oct 2007 13:33:35 +0200, Kees Nuyt wrote >> On Wed, 10 Oct 2007 22:10:38 -0500, you wrote: >>> You might want to be a little bit more clear about the fact that >>> [transaction] nests even though BEGIN does not

Re: [sqlite] Insert query very slow

2007-10-21 Thread Kees Nuyt
c/wiki?p=PerformanceTuning >Regards > >trax -- ( Kees Nuyt ) c[_] - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] unsigned integer, text, tutorial, and keys

2007-10-24 Thread Kees Nuyt
y don't have to escape quotes if you prepare / bind the values. >Web links: >-Do you know good web tutorials, code samples, >opensource projects showing how to use SQLite mainly >with php and pdo ? I am sure there are, but I don't know of any, up to now the information in the PH

Re: [sqlite] How to exit from sqlite shell?

2009-05-04 Thread Kees Nuyt
n't know if Control-D works on windows) Control-D doesn't work in sqlite3.exe on windows, Control-C does, both in the windows shell (CMD.EXE) and in msys (mingw32) bash. -- ( 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 exit from sqlite shell?

2009-05-04 Thread Kees Nuyt
y itself is enough. >Pavel -- ( 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 check the healthy of database and the indexes of the tables

2009-05-05 Thread Kees Nuyt
ge is malformed". > Is there any command to check if the index >or database in good condition. PRAGMA integrity_check; http://www.sqlite.org/pragma.html#debug >Thanks, >JP -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite

Re: [sqlite] SQL error: database disk image is malformed

2009-05-05 Thread Kees Nuyt
make sense. @Joannek: When using group by, your select columns can only use aggregate functions and the columns you group by. Perhaps you meant to use ORDER BY here ? >Pavel -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sql

Re: [sqlite] SQL error: database disk image is malformed

2009-05-06 Thread Kees Nuyt
On Wed, 6 May 2009 00:40:22 -0500, "Jay A. Kreibich" wrote: >On Tue, May 05, 2009 at 11:46:38PM +0200, Kees Nuyt scratched on the wall: >> On Tue, 5 May 2009 16:55:42 -0400, Pavel Ivanov >> wrote: >> >> >Is it just me or somebody else is >> &

Re: [sqlite] sqlite3 source code modification

2009-05-06 Thread Kees Nuyt
could print messages by above way. But since >yesterday, it's never printed anything. I even reinstalled my os system. >I am pretty much confused with it. Could anyone give me some advice, please? In your shell, type: which sqlite3 Does the result point to the result of yur compilation of sqlite3 ? >Thanks so much. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Increasing output

2009-05-06 Thread Kees Nuyt
n here. Guessing: To sort by the third column of your result set, use: SELECT * FROM mytable ORDER BY name_of_third_column; or SELECT * FROM mytable ORDER BY 3; >Thanks in advance. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-us

Re: [sqlite] sqlite in shell loop

2009-05-06 Thread Kees Nuyt
e any other unix utility. Just give it a go. Experiment. And enjoy. >Thanks in advance -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sqlite3 tables hidden from program to program

2009-05-06 Thread Kees Nuyt
nd line? As in: # sqlite3 my.db See also: http://www.sqlite.org/quickstart.html If you leave out the databasefilename, sqlite uses an in-memory database, which is destroyed as soon as you leave/quit/exit the command line tool program. >Thanks >rb -- ( Kees Nuyt ) c[_] __

Re: [sqlite] sqlite in shell loop

2009-05-06 Thread Kees Nuyt
On Wed, 6 May 2009 23:24:00 +0200, Daniel Wolny wrote: >2009/5/6 Kees Nuyt : >> On Wed, 6 May 2009 23:01:24 +0200, Daniel Wolny >> wrote: >> It should be possible, sqlite sends its output to stdout, so >> it works like any other unix utility. >> >> Just

Re: [sqlite] Newbie trying to list resultSet with C

2009-05-08 Thread Kees Nuyt
SQLite database. Very basic but fully functional nevertheless. http://www.sqlite.org/cvstrac/wiki?p=SampleCode Example C code for creating / writing to / reading from a database. >TIA, >Nuno Magalhães -- ( Kees Nuyt ) c[_] ___ sqlite-users

Re: [sqlite] Multiple counts between two tables

2009-05-10 Thread Kees Nuyt
O tag_link values (49,3); SELECT app_name.id,app,COUNT(tag_link.tag_id) AS nrtags FROM tag_link INNER JOIN app_name ON (app_name.id = tag_link.app_id) GROUP BY tag_link.app_id; app_name.id|app_name.app|nrtags 30|a|1 39|b|1 49|t|2 331|d|3 >The parser returns no error, only seems to freeze. Tip

Re: [sqlite] Multiple counts between two tables

2009-05-10 Thread Kees Nuyt
same application ('d') uses the same tag more then once. Is that on purpose? In other words, it's not completely clear to me what you are trying to accomplish. >Regards, >-steffen > > >Kees Nuyt wrote: >> >> On Sun, 10 May 2009 13:51:29 -0700 (PDT), ckeen &

Re: [sqlite] Sqlite as a FIFO buffer?

2009-05-18 Thread Kees Nuyt
php fragment to create a job with or without parameters ==== === it's part of a class which extends PDO === I prefer php_pdo_sqlite_external function enter_job($userid,$cmnd,$parlist,$ntuid,$ntpsw,$jobprio = 8){ $msg = ''; /* Execute a prepared statement by passing an array of values --> */ $sql = 'INSERT INTO jobs (userid,cmnd,pars,jobprio) VALUES (:userid,:cmnd,:pars,:jobprio)'; $stjob = $this->prepare($sql); $this->beginTransaction(); $stjob->execute(array(':userid' => $userid, ':cmnd' => $cmnd, ':pars' => '@list', ':jobprio' => $jobprio)); /* * * This will accommodate up to 99 999 999 requests, * then we have to reset by deleting the database. * It will be rebuilt automatically * 01234567 oO0 */ $jobid = $this->lastInsertId(); $tsn = substr(1000 + $jobid,4,4); if (isset($parlist)){ /* there are parameters */ $sql = 'INSERT INTO pars (jobid,partx) VALUES (:jobid,:partx)'; $stpar = $this->prepare($sql); if (is_array($parlist)){ /* we got a text array with params */ foreach ($parlist as $aval){ $stpar->execute(array(':jobid' => $jobid, ':partx' => $aval)); } } else if (is_object($parlist)) { /* we got a resultset from a query as paramlist */ while ($row = $parlist->fetch(PDO::FETCH_NUM)){ $stpar->execute(array(':jobid' => $jobid, ':partx' => $row[0])); } } } else { } $this->commit(); /* * ugly code to launch the dispatcher asynchronously using * Windows schtasks.exe is left to the imagination of the reader */ } -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sqlite as a FIFO buffer? (How make atomic?)

2009-05-18 Thread Kees Nuyt
_fifo = > (id, fk_task_log) >Table: task_status_log => (id, fk_task_log, status_code, time_stamp) > >And in psudo SQL: > >TRIGGER ON INSERT INTO task_log: >BEGIN >INSERT INTO task_fifo (fk_task_log) VALUES (NEW.id) >END; > >TR

Re: [sqlite] most efficient way to get 1st row

2009-05-19 Thread Kees Nuyt
fore it can return the first row in the resultset. Need I say more? 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] Simple Outer Join question?

2009-05-25 Thread Kees Nuyt
imple, but not for me. This is an n:m relationship. If group has more attributes (columns) than just its number, you need a third table: person_group. Then join person with person_group where group_id != 1; The person_group table could be called membership, if you like. >Thanks

Re: [sqlite] create indexed view

2009-05-26 Thread Kees Nuyt
On Tue, 26 May 2009 14:44:25 +0800, wying wy wrote: >Hi > >May I know if we can create index on a View? You can't create an index on a VIEW. A VIEW can be seen as a stored SELECT statement. >Thanks in advance. >wying --

Re: [sqlite] Deleting database content : SQLite3 API

2009-05-30 Thread Kees Nuyt
tup, I cannot just drop the >> tables. ( As the table which are present in the existing data base is >> not known. ) >> >> I am using sqlite3wrapped C++ library APIs. >> >> Thanks and Regards, >> Souvik -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] (no subject)

2009-06-01 Thread Kees Nuyt
ny input on this? ASCII versus UTF-8 or UTF-16? -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Question on Indexing

2009-06-01 Thread Kees Nuyt
(a_id,b_id) the primary key to enforce that constraint. >Thanks >Ralf -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Should we upgrade the SQLite to 6.6.14.2 from 3.59

2009-06-01 Thread Kees Nuyt
sqlite, a weekly peek at http://www.sqlite.org/cvstrac/timeline is worth the effort. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] how can we solve IF EXIST in SQLite

2009-06-02 Thread Kees Nuyt
. WHERE stock_id = 1; if sqlite_error() INSERT INTO stock_tab SET (...) VALUES (...); endif COMMIT; -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Syntax to set the conflict resolution of a transaction

2009-06-02 Thread Kees Nuyt
y INSERT statement, which has implications for your program flow. http://www.sqlite.org/lang_insert.html http://www.sqlite.org/lang_conflict.html (You probably already read those pages, I included the links for the convenience of other readers) >Luiz -- ( Kees Nuyt ) c[_]

Re: [sqlite] Syntax to set the conflict resolution of a transaction

2009-06-02 Thread Kees Nuyt
e's a way to check if a transaction failed (for constraint or >another error) and than rollback without clearing the error message >returned by sqlite3_errmsg? After a ROLLBACK; there is no error (ROLLBACK is succesful), so the error message will be cleared. You can use INSERT .... ON CONFL

Re: [sqlite] Before Update trigger question

2009-06-02 Thread Kees Nuyt
e_id,table_group_id,table_id,role ) VALUES ( (SELECT device_id FROM registrations WHERE mesg_token = 'aa') , 1, 2, 2); SQL error near line 38: 1001: Insert -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite programmed in C++

2009-06-02 Thread Kees Nuyt
h a decent C++ compiler, there are good C++ wrappers. So, there is a choice for application development. >I just read the Linus Torvalds comment on the C++ for Git >What do you think? > >Cheers, >Sylvain -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] Before Update trigger question

2009-06-02 Thread Kees Nuyt
ime') > WHERE rowid = new.rowid; >END; > > > it ticked another update trigger. I found workaround by > adding UPDATE OF clause for a specific field > >CREATE TRIGGER validate_players_update_role BEFORE UPDATE OF role ON players > > >Now I even unde

Re: [sqlite] how can we solve IF EXIST in SQLite

2009-06-03 Thread Kees Nuyt
>--- On Wed, 6/3/09, robinsmathew wrote: > > >From: robinsmathew >Subject: Re: [sqlite] how can we solve IF EXIST in SQLite >To: sqlite-users@sqlite.org >Date: Wednesday, June 3, 2009, 3:15 AM > > > >its showing an error near "if": syntax error >

Re: [sqlite] [OT-ish] ResultSet size

2009-06-07 Thread Kees Nuyt
SELECT Count() in >SQLite is not optimized. It has recently been optimized, but only for the form: SELECT count(*) FROM without WHERE or LIMIT clauses. http://www.sqlite.org/cvstrac/chngview?cn=6316 >For big result sets, I might want to just do >one mongo select and then count the results in memory. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Compite with DSQLITE_THREADSAFE=1 but application has mulitple threads using the same connection

2009-06-09 Thread Kees Nuyt
same issue was discussed very recently in the mailing list. You may want to consult the archives. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Compite with DSQLITE_THREADSAFE=1 but application has mulitple threads using the same connection

2009-06-10 Thread Kees Nuyt
rse you have to search the ticket database. http://www.sqlite.org/cvstrac/search?t=1&c=1 Any problem ever reported is registered there. >____ >From: Kees Nuyt >To: sqlite-users@sqlite.org >Sent: Tuesday, June 9, 2009 12:52:47 PM >Subject: Re: [sqlit

Re: [sqlite] UPDATE with inline view/ derived table

2009-06-11 Thread Kees Nuyt
ot;the tables behind" a view with an INSTEAD OF trigger. The trigger can contain any update statement you like. http://www.sqlite.org/lang_createtrigger.html#instead_of_trigger >Best regards. > >Frank -- ( Kees Nuyt ) c[_] ___ sqlite

Re: [sqlite] sql query with sqlite3_exec

2009-06-12 Thread Kees Nuyt
&zErrMsg ); > >How can i save the returned result-table in a C string for further use in >the program? Have a look at some sample code: http://www.sqlite.org/cvstrac/wiki?p=SimpleCode http://www.sqlite.org/cvstrac/wiki?p=SampleCode >Thanks. -- ( Kees Nuyt ) c[_] ___

Re: [sqlite] Database logic in TRIGGER and CONFLICT, or in software ?

2009-06-14 Thread Kees Nuyt
key, which converts those constraints into TRIGGERs that implement them. http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers There's also a site that implements it: http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator >Simon. -- ( Kees Nuyt

Re: [sqlite] Database inserts gradually slowing down

2009-06-16 Thread Kees Nuyt
number of INSERTs per transaction - The schema: INDEX PRIMARY KEY on the first column instead of a non-unique index (if the application allows it) - load the database in order of index(es) Especially a non-unique index with low cardinality has a lot of overhead. >JP -- ( Kees Nuyt ) c

Re: [sqlite] search in archive

2009-06-19 Thread Kees Nuyt
our system has multiple processor cores, and if the databases are each on a different disk. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite3 data mode for emacs?

2009-06-21 Thread Kees Nuyt
atabase browsers for SQLite databases though, with an editable grid. I use Sqlite3explorer, SqliteSpy and SqliteManager. The last one is a Firefox add-on. -- ( Kees Nuyt ) c[_] ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqli

Re: [sqlite] SQLite3 data mode for emacs?

2009-06-21 Thread Kees Nuyt
On Sun, 21 Jun 2009 12:44:51 -0700, Kelly Jones wrote: >On 6/21/09, Kees Nuyt wrote: >> On Sun, 21 Jun 2009 10:01:22 -0700, Kelly Jones >> wrote: >> >>>Emacs' "forms mode" lets you edit a text file as though each line were >>>a database rec

Re: [sqlite] Memory leak with sqlite3_exec on qnx 6.4.1

2009-06-26 Thread Kees Nuyt
27;s a good idea, for at least two reasons: - opening a connection has to parse the schema, and though it's fast code, it should be avoided. - the contents of the page cache aren't wasted, it may be re-used by subsequent statements. -- ( Kees Nuyt ) c[_]

  1   2   3   4   5   6   7   8   9   >