Re: [sqlite] confusing with how to to this in sqlite

2008-12-22 Thread Rachmat Febfauza
= Without the group by clause the result set is: sqlite> select awal1.Code, awal1.Level, awal1.Category, awal1.Product, awal1.Location, awal1."Begin",akhir1."End", strftime("%s",akh ir1."End")-strftime("%s",awal1."Begin") as Difference from awal1, akhir1 where awal1.Code =

Re: [sqlite] UPDATE a ROW based on an UPDATE of a different ROW

2008-12-22 Thread jose isaias cabrera
"Igor Tandetnik" wrote... >> As you can see, this UPDATE, >> >> UPDATE foo SET bdate = (SELECT f2.edate FROM foo f1 JOIN foo >> f2 ON f1.PID = f2.PID AND f1.lang = f2.lang WHERE f1.job = 'val' AND >> f2.job = 'trans' AND f1.id = foo.id AND f1.bdate < f2.edate) >> WHERE foo.job = 'val'; >> >>

Re: [sqlite] INVALID COMMAND NAME sqlite3_soft_heap_limit

2008-12-22 Thread Shane Harrelson
If you use the supplied makefile, "make fulltest" should build the testfixture and run the all.test set. The testfixture is similar to the sqlite3 CLI except that it includes a TCL interpreter as well as an extensive set of test harnesses for virtually every part of the SQLite core. On Mon, Dec

Re: [sqlite] UPDATE a ROW based on an UPDATE of a different ROW

2008-12-22 Thread Igor Tandetnik
"jose isaias cabrera" wrote in message news:5c0942b2619c4403b47ddf72586c8...@stso.mc.xerox.com > As you can see, this UPDATE, > > UPDATE foo SET bdate = (SELECT f2.edate FROM foo f1 JOIN foo > f2 ON f1.PID = f2.PID AND f1.lang = f2.lang WHERE f1.job = 'val' AND > f2.job =

[sqlite] Kevin Smekens is out of the office.

2008-12-22 Thread Kevin Smekens
I will be out of the office starting 2008/12/23 and will not return until 2009/01/05. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] UPDATE a ROW based on an UPDATE of a different ROW

2008-12-22 Thread jose isaias cabrera
Greetings! imagine this situation... CREATE TABLE foo (id, PID, bdate, edate, lang,job); INSERT INTO foo VALUES (1, 232,'2008-01-01','2008-01-10','es','trans'); INSERT INTO foo VALUES (2, 232,'2008-01-01','2008-01-10','fr','trans'); INSERT INTO foo VALUES (3,

[sqlite] Fwd: sqlite memory usage

2008-12-22 Thread #
Hello, My multi-threaded application has various sqlite db's open simultaneously, in memory using the :memory: keyword, disk based db's and at times, tmpfs (ram) db's. Is there a way to view each individual database's memory usage? I found the functions sqlite3_memory_used() and

Re: [sqlite] rtree segfault on Linux X86_64

2008-12-22 Thread Dan
On Dec 22, 2008, at 12:46 PM, Josh Purinton wrote: > I get a segfault using a particular rtree query. Here's the simplest > way I > could find to reproduce it. Thanks for doing that. The patch linked from this page (click "Patchset" toward the top-left of the page) fixes things:

Re: [sqlite] INVALID COMMAND NAME sqlite3_soft_heap_limit

2008-12-22 Thread mkrajachandru
Hello Dan, Thank U for ur reply.. Could you please let me know more about testfixture. Also, please forward releated links Thanks Chandru On Mon, Dec 22, 2008 at 3:06 PM, Dan wrote: > > On Dec 22, 2008, at 3:55 PM, mkrajachan...@gmail.com wrote: > > > Hello all, > >

Re: [sqlite] SQLITE3_OPEN returns SQLITE_NOMEM

2008-12-22 Thread Nuno Lucas
On Mon, Mar 24, 2008 at 3:13 PM, sqlite wrote: > > Dear All, > > I have just started using the SQLite Db in my applications. My application > runs under MIPS processor. I have generated the Sqlite3.dll and Sqlite3.lib > file for the MIPS processor and it is geting

Re: [sqlite] Id when using select statement (Noob)

2008-12-22 Thread Igor Tandetnik
"Tommy Benson" wrote in message news:a1a7fb90812201757i4aa3339ma8489161aec89...@mail.gmail.com > Is there a way to get select and update statements show to rows ids > in temporary sorted order > For example: > SELECT * FROM Persons > ORDER BY LastName DESC > > > P_Id

[sqlite] rtree segfault on Linux X86_64

2008-12-22 Thread Josh Purinton
I get a segfault using a particular rtree query. Here's the simplest way I could find to reproduce it. $ uname -a Linux odysseus 2.6.18-6-xen-vserver-amd64 #1 SMP Fri Jun 6 07:07:31 UTC 2008 x86_64 GNU/Linux $ sqlite3 -version 3.6.7 $ cat >bug.sql create table foo (id integer primary key); create

[sqlite] Id when using select statement (Noob)

2008-12-22 Thread Tommy Benson
Is there a way to get select and update statements show to rows ids in temporary sorted order For example: SELECT * FROM Persons ORDER BY LastName DESC P_Id LastName FirstName Address City 2 Svendson Tove Borgvn 23 Sandnes 3 Pettersen Kari Storgt 20 Stavanger 4 Nilsen Tom Vingvn 23 Stavanger

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread flakpit
> 2. The above statement gets the lowest rowid but there appears to be > no > implicit statement to the direction of the ORDER BY clause. Can the > statement be reversed to get the highest rowid? > SELECT ... FROM ORDER BY rowid DESC LIMIT 1; Okay, I feel very stupid now, hadn't twigged. I

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:18 PM, flakpit wrote: > > > > Dan Kennedy-4 wrote: >> >> >>> Is there any way to fetch the very first record in the database and >>> find the > id number? >> >> The 'first record' is a malleable concept. You can find the record >> with >> the lowest rowid value with: >>

Re: [sqlite] SQLite under windows

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:10 PM, Dancsa wrote: > Good Morning > I have some problem with sqlite. > I can't use it. I googled a lot after examples but i just found how > to use it under linux with gcc. > Where can I find static library to link in or how sould I use the dll? Easiest way to use

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread flakpit
Dan Kennedy-4 wrote: > > >> Is there any way to fetch the very first record in the database and >> find the > id number? > > The 'first record' is a malleable concept. You can find the record with > the lowest rowid value with: > >SELECT ... FROM ORDER BY rowid LIMIT 1; > > Thank

Re: [sqlite] Atomicity with triggers.

2008-12-22 Thread Dan
On Dec 22, 2008, at 6:08 PM, Srinivas Nayak wrote: > Hi All, > > I am executing a SQL query DELETE using the function > sqlite3_exec( ). I have > a AFTER trigger that will be activated by my SQL query DELETE that > is being > executed. I have a doubt on the execution of sqlite3_exec( ). > >

[sqlite] SQLite under windows

2008-12-22 Thread Dancsa
Good Morning I have some problem with sqlite. I can't use it. I googled a lot after examples but i just found how to use it under linux with gcc. Where can I find static library to link in or how sould I use the dll? It's needed to make pointers(with GetProccAddress) to each function which i'd

[sqlite] Atomicity with triggers.

2008-12-22 Thread Srinivas Nayak
Hi All, I am executing a SQL query DELETE using the function sqlite3_exec( ). I have a AFTER trigger that will be activated by my SQL query DELETE that is being executed. I have a doubt on the execution of sqlite3_exec( ). Will the function sqlite3_exec( ) return after the 'actions of DELETE

Re: [sqlite] Fetch first non-sequential record

2008-12-22 Thread Dan
On Dec 22, 2008, at 5:43 PM, flakpit wrote: > > Good evening. > > Due to many deletions, my database is non sequential anymore. > > Is there any way to fetch the very first record in the database and > find the > id number? Or for that matter, a function to select the last record? > > I've

[sqlite] Fetch first non-sequential record

2008-12-22 Thread flakpit
Good evening. Due to many deletions, my database is non sequential anymore. Is there any way to fetch the very first record in the database and find the id number? Or for that matter, a function to select the last record? I've tried the "SELECT TOP 1" function butt that apparently isn't

Re: [sqlite] INVALID COMMAND NAME sqlite3_soft_heap_limit

2008-12-22 Thread Dan
On Dec 22, 2008, at 3:55 PM, mkrajachan...@gmail.com wrote: > Hello all, > > While i am trying to run the all.test file through the tcl shell > > I am getting the following error > > > # tclsh all.test > invalid command name "sqlite3_soft_heap_limit" >while executing >

[sqlite] About Sqlite cache

2008-12-22 Thread yoky
Hi all, I have some question about Sqlite cache: 1. In the Sqlite docs, It's said :" If you are doing UPDATEsor DELETEs that change many rows of a database and you do not mind if SQLite uses more

[sqlite] INVALID COMMAND NAME sqlite3_soft_heap_limit

2008-12-22 Thread mkrajachandru
Hello all, While i am trying to run the all.test file through the tcl shell I am getting the following error # tclsh all.test invalid command name "sqlite3_soft_heap_limit" while executing "sqlite3_soft_heap_limit $soft_limit" (file "./tester.tcl" line 50) invoked from within