Re: [sqlite] SQLite.org needs online forms

2007-08-02 Thread john s wolter
Wiki's. I have not used them myself. What's the general idea? Is there a form type that would be easy to use? On 8/3/07, Paul Harris <[EMAIL PROTECTED]> wrote: > > i haven't been around long, but here's my 2c anyway, > > i find the sourceforge forums hopeless, any time I need to look for >

Re: [sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Paul Harris
On 03/08/07, Nikola Miljkovic <[EMAIL PROTECTED]> wrote: > [In the message "Re: [sqlite] Re: Re: how do i declare and use variables in > sqlite?" on Aug 3, 11:47, "Paul Harris" writes:] > > > >> create temporary table vars (name text, value something); > > > >> -- > > > >> insert into vars set

Re: [sqlite] SQLite.org needs online forms

2007-08-02 Thread Paul Harris
i haven't been around long, but here's my 2c anyway, i find the sourceforge forums hopeless, any time I need to look for info on one of their projects, i end up looking through their mailing list - where forum posts are automatically sent to anyway. mailing lists are good for on-going issues.

[sqlite] SQLite.org needs online forms

2007-08-02 Thread john s wolter
SQLite.org in my opinion, needs to have online community forms. I first used majordomo ten years ago which is like the list manager being used for sqlite-users@sqlite.org but in today's Internet it can be mistaken for SPAM. I do not know if SQLite would qualify because of the Public Domain

RE: [sqlite] UI question

2007-08-02 Thread Kalyani Tummala
Simply put a ; there..it will finish the command and says invalid sqlite command and comes back to the commad mode again. -Original Message- From: Griggs, Donald [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 8:04 PM To: sqlite-users@sqlite.org Subject: RE: [sqlite] UI

Re: [sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Nikola Miljkovic
[In the message "Re: [sqlite] Re: Re: how do i declare and use variables in sqlite?" on Aug 3, 11:47, "Paul Harris" writes:] > > >> create temporary table vars (name text, value something); > > >> -- > > >> insert into vars set name="x", value=0; > > >> -- > > >> ... where something = (select

[sqlite] Indexes usage on Foreign Key

2007-08-02 Thread Bharath Booshan L
I am using sqlite v3.1.3 on Mac OS 10.4 Consider the following schema Create table Library(LibraryID INTEGER PRIMARY KEY AUTOINCRMENT, LibraryName TEXT); Create table Book(LibraryID INTEGER REFERENCES Library, BookID TEXT PRIMARY KEY, BookName TEXT); Now I believe Library(LibraryID) is

Re: [sqlite] Parser information

2007-08-02 Thread Dan Kennedy
On Thu, 2007-08-02 at 13:19 -0700, Rohit Mordani wrote: > Hi Ken, >Do you have an answer to what external api we can use to get the > Select parse tree? There is no such API. You are in hacking territory on this one. Dan. > > Rohit > > On 7/31/07, Joe Wilson <[EMAIL PROTECTED]>

Re: [sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Paul Harris
> >> create temporary table vars (name text, value something); > >> -- > >> insert into vars set name="x", value=0; > >> -- > >> ... where something = (select value from vars where name="x")... > >> > > > > I tried doing this, but there doesn't seem to be a way to do the same > > thing with an

[sqlite] Replacing Clipper DB lookup application

2007-08-02 Thread john s wolter
I have an old Clipper DBF type application that has worked well but times changed and changed long ago. The feature of this DBF, non-GUI, text oriented, application is that it is mostly a list lookup application with few DB changes. A separate Admin program does list management. The list is

[sqlite] Re: sqlite3_update_hook does not get called when other app updates shared db

2007-08-02 Thread Igor Tandetnik
Chase <[EMAIL PROTECTED]> wrote: When i call sqlite3_update_hook() from App "A" and point it to my callback, i am only notified when app "A" updates the database. When app "B" (another instance of the same app as "A") updates the database, app "A"'s callback is never called, and vice versa. I

[sqlite] sqlite3_update_hook does not get called when other app updates shared db

2007-08-02 Thread Chase
When i call sqlite3_update_hook() from App "A" and point it to my callback, i am only notified when app "A" updates the database. When app "B" (another instance of the same app as "A") updates the database, app "A"'s callback is never called, and vice versa. I thought the whole point of

[sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Igor Tandetnik
Paul Harris <[EMAIL PROTECTED]> wrote: On 03/08/07, Nikola Miljkovic <[EMAIL PROTECTED]> wrote: This is certainly true, but there might be cases where one wants to keep certain results between sql statements and reuse them. While this conceptual solution is certainly not the Variable it sort of

[sqlite] Re: Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Igor Tandetnik
Nikola Miljkovic <[EMAIL PROTECTED]> wrote: create temporary table vars (name text, value something); insert into vars set name="x", value=0; Surely you mean insert into vars(name, value) values('x', 0); Igor Tandetnik

[sqlite] Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Igor Tandetnik
Paul Harris <[EMAIL PROTECTED]> wrote: in MySQL, you can do something like: select @xyz := column from table where id=1; can this be done in Sqlite? No. is there an equivalent in "standard" sql? No. Igor Tandetnik

Re: [sqlite] Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Paul Harris
On 03/08/07, Nikola Miljkovic <[EMAIL PROTECTED]> wrote: > [In the message "[sqlite] Re: how do i declare and use variables in sqlite?" > on Aug 2, 18:22, "Igor Tandetnik" writes:] > > Chase <[EMAIL PROTECTED]> wrote: > > > how do i declare and use variables in sqlite? > > > > You don't. You

[sqlite] Re: Index Creation Questions

2007-08-02 Thread Igor Tandetnik
Trey Mack <[EMAIL PROTECTED]> wrote: Enough words.. concrete example: CREATE TABLE t (id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT, b TEXT, c TEXT); CREATE INDEX i1 ON t (a); -- is this sufficient? CREATE INDEX i2 ON t (a, id); -- or is this necessary to avoid going back to the original table?

Re: [sqlite] Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Nikola Miljkovic
[In the message "[sqlite] Re: how do i declare and use variables in sqlite?" on Aug 2, 18:22, "Igor Tandetnik" writes:] > Chase <[EMAIL PROTECTED]> wrote: > > how do i declare and use variables in sqlite? > > You don't. You declare and use variables in whatever program you write > that runs

Re: [sqlite] UI question

2007-08-02 Thread Chris Peachment
On Thu, 2 Aug 2007 14:16:28 -0700 (PDT), Joe Wilson wrote: >--- John Stanton <[EMAIL PROTECTED]> wrote: >> Sqlite3 will get into a tangle with certain sequences where it does not >> accept a semicolon as a terminator or obey a CTL c. >To reproduce: >1. build sqlite3 without readline support.

Re: [sqlite] how do i declare and use variables in sqlite?

2007-08-02 Thread Paul Harris
On 03/08/07, James Dennett <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Chase [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 02, 2007 12:39 PM > > To: sqlite-users@sqlite.org > > Subject: [sqlite] how do i declare and use variables in sqlite? > > > > > > select 542 as

[sqlite] Index Creation Questions

2007-08-02 Thread Trey Mack
I'm creating some indices, and want to know if it's going to help or hurt me (or be totally irrelevant because of optimization) to include the primary key at the end of the index. All of my tables (in question) have an INTEGER PRIMARY KEY AUTOINCREMENT field, and I have several textual

Re: [sqlite] Problem with SQLite FastCGI module "malformed database schema"

2007-08-02 Thread Zbigniew Baniewski
On Wed, Aug 01, 2007 at 03:04:35PM -0700, Joe Wilson wrote: > Maybe the php wrapper is not closing sqlite connections correctly > (or at all). > > See if you can get the stack traces of all threads in the php process > 162 via pstack, lsstack or by attaching gdb to it at runtime. Before I'll

Re: [sqlite] UI question

2007-08-02 Thread John Stanton
It seems to be connected with xterm. Joe Wilson wrote: --- John Stanton <[EMAIL PROTECTED]> wrote: Sqlite3 will get into a tangle with certain sequences where it does not accept a semicolon as a terminator or obey a CTL c. To reproduce: 1. build sqlite3 without readline support. 2. run

Re: [sqlite] Implementation of ANSI SQL-92 FOREIGN KEY and referential integrity

2007-08-02 Thread Darren Duncan
At 2:11 PM -0700 8/2/07, Mikey C wrote: Does anyone know if there is a plan to implement the enforcement of the SQL-92 FOREIGN KEY constraints? Seems to me the No.1 missing feature. After all, data integrity, even in an embedded DB is very important and bugs in client code can easily mess up

Re: [sqlite] Parser information

2007-08-02 Thread Joe Wilson
You already have the answer to your question. There's no need for badgering. --- Rohit Mordani <[EMAIL PROTECTED]> wrote: > Hi Ken, >Do you have an answer to what external api we can use to get the > Select parse tree? > > Rohit > > On 7/31/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > >

[sqlite] Re: Query Indexes

2007-08-02 Thread Igor Tandetnik
Mitchell Vincent <[EMAIL PROTECTED]> wrote: Is there any way to determine if a query is using an index or not? In PostgreSQL the "explain" works to tell whether a table is being sequentially scanned or not.. Prepend the query with EXPLAIN QUERY PLAN I have a query : SELECT *,(total -

RE: [sqlite] how do i declare and use variables in sqlite?

2007-08-02 Thread James Dennett
> -Original Message- > From: Chase [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 02, 2007 12:39 PM > To: sqlite-users@sqlite.org > Subject: [sqlite] how do i declare and use variables in sqlite? > > > select 542 as x; > > that part works, but then when i try to access it, i get "no

[sqlite] Re: how do i declare and use variables in sqlite?

2007-08-02 Thread Igor Tandetnik
Chase <[EMAIL PROTECTED]> wrote: how do i declare and use variables in sqlite? You don't. You declare and use variables in whatever program you write that runs SQLite statements. Igor Tandetnik - To unsubscribe,

[sqlite] Re: Custom GLOBing function

2007-08-02 Thread Igor Tandetnik
Shane Harrelson <[EMAIL PROTECTED]> wrote: I changed my registration to: sqlite3_create_function(db, "my_glob", 2, SQLITE_ANY, NULL, my_glob, NULL, NULL); and then tried modifying my query to use the following forms: SELECT * FROM foo WHERE bar MY_GLOB '*' SELECT * FROM foo WHERE MY_GLOB(bar,

Re: [sqlite] UI question

2007-08-02 Thread John Stanton
Sqlite3 will get into a tangle with certain sequences where it does not accept a semicolon as a terminator or obey a CTL c. Chris Peachment wrote: On Thu, 02 Aug 2007 08:21:30 -0600, Scott Derrick wrote: This is probably a stupid question but has frustrated me a couple of times. When

Re: [sqlite] UI question

2007-08-02 Thread Joe Wilson
--- John Stanton <[EMAIL PROTECTED]> wrote: > Sqlite3 will get into a tangle with certain sequences where it does not > accept a semicolon as a terminator or obey a CTL c. To reproduce: 1. build sqlite3 without readline support. 2. run sqlite3 in an xterm 3. at the prompt, press cursor up 4.

Re: [sqlite] "database is locked" SQLITE_BUSY when db is on network drive...

2007-08-02 Thread Mitchell Vincent
Can you do any other write queries (INSERT or UPDATE for example)? On 8/2/07, Chase <[EMAIL PROTECTED]> wrote: > > running sqlite 3.4.1 on mac os x 10.4 > > i've set up a file share on another mac running 10.4 and placed a small > db file on the share and chmod'ed it to 777 (full access). > > i

[sqlite] Implementation of ANSI SQL-92 FOREIGN KEY and referential integrity

2007-08-02 Thread Mikey C
Hi, Does anyone know if there is a plan to implement the enforcement of the SQL-92 FOREIGN KEY constraints? Seems to me the No.1 missing feature. After all, data integrity, even in an embedded DB is very important and bugs in client code can easily mess up the referential integrity. Does

[sqlite] Query Indexes

2007-08-02 Thread Mitchell Vincent
Is there any way to determine if a query is using an index or not? In PostgreSQL the "explain" works to tell whether a table is being sequentially scanned or not.. I have a query : SELECT *,(total - balance_due) as total_paid FROM invoice_master WHERE lower(invoice_number) LIKE lower('%%') AND

Re: [sqlite] Parser information

2007-08-02 Thread Rohit Mordani
Hi Ken, Do you have an answer to what external api we can use to get the Select parse tree? Rohit On 7/31/07, Joe Wilson <[EMAIL PROTECTED]> wrote: > > --- Ken <[EMAIL PROTECTED]> wrote: > > You should be using the external API calls not the internal sqlite calls > and types. > > Please

[sqlite] how do i declare and use variables in sqlite?

2007-08-02 Thread Chase
select 542 as x; that part works, but then when i try to access it, i get "no column x"... select x; set x = 542; var x = 542; @set x = 542; @var x = 542; set @x = 542; var @x = 542; $set x = 542; $var x = 542; set $x = 542; var $x = 542; none of these seem to work and i can't find the

[sqlite] Custom GLOBing function

2007-08-02 Thread Shane Harrelson
I have a query of the following form using SQLite's built in GLOB function: SELECT * FROM foo WHERE bar GLOB '*' I implemented a custom glob(x,y) function to replace the built-in GLOB, registering it with: sqlite3_create_function(db, "glob", 2, SQLITE_ANY, NULL, my_glob, NULL, NULL); This all

[sqlite] "database is locked" SQLITE_BUSY when db is on network drive...

2007-08-02 Thread Chase
running sqlite 3.4.1 on mac os x 10.4 i've set up a file share on another mac running 10.4 and placed a small db file on the share and chmod'ed it to 777 (full access). i go to the development mac and log into the other mac as the user who owns that db file. the path on my dev mac to that

Re: [sqlite] UI question

2007-08-02 Thread Joe Wilson
> This is probably a stupid question but has frustrated me a couple of times. > > When using the command line interface sqlite3, a couple of times I have > forgotten to use the "." before a command. After that I get a "...>" > prompt that I can't seem to escape from and accepts no commands?

Re: [sqlite] UI question

2007-08-02 Thread John Stanton
It is a bug in sqlite3. You can kill the process from another channel or supend it with a CTL Z and then kill it locally. Scott Derrick wrote: This is probably a stupid question but has frustrated me a couple of times. When using the command line interface sqlite3, a couple of times I have

[sqlite] SQLITE_BUSY "database is locked" when db is on network drive...

2007-08-02 Thread Chase
running sqlite 3.4.1 on mac os x 10.4 i've set up a file share on another mac running 10.4 and placed a small db file on the share and chmod'ed it to 777 (full access). i go to the development mac and log into the other mac as the user who owns that db file. the path on my dev mac to that

Re: [sqlite] extension-functions.tgz for sqlite3 3.4.1 ?

2007-08-02 Thread Joe Wilson
--- Paul Harris <[EMAIL PROTECTED]> wrote: > I wanted to get a LOG10() function in sqlite3, and I found the > extension-functions.tgz file in http://sqlite.org/contrib > > I am using the all-in-one sqlite3.h/c version of sqlite3, and the > extension-functions files don't seem to fit at all. > >

[sqlite] SQLITE_BUSY "database is locked" when db is on network drive...

2007-08-02 Thread Chase
running sqlite 3.4.1 on mac os x 10.4 i've set up a file share on another mac running 10.4 and placed a small db file on the share and chmod'ed it to 777 (full access). i go to the development mac and log into the other mac as the user who owns that db file. the path on my dev mac to that

Re: [sqlite] UI question

2007-08-02 Thread Jim Dodgen
also if the semicolon does not get you back to the prompt you may have an open quoted string so try a "; to close it and get you back. Quoting Dan Kennedy <[EMAIL PROTECTED]>: > On Thu, 2007-08-02 at 08:21 -0600, Scott Derrick wrote: > > This is probably a stupid question but has frustrated

Re: [sqlite] UI question

2007-08-02 Thread Trey Mack
When using the command line interface sqlite3, a couple of times I have forgotten to use the "." before a command. After that I get a "...>" prompt that I can't seem to escape from and accepts no commands? My only choice is to shut down that terminal and start a new one.. There must be an

Re: [sqlite] UI question

2007-08-02 Thread Chris Peachment
On Thu, 02 Aug 2007 08:21:30 -0600, Scott Derrick wrote: >This is probably a stupid question but has frustrated me a couple of times. >When using the command line interface sqlite3, a couple of times I have >forgotten to use the "." before a command. After that I get a "...>" >prompt that I

[sqlite] Re: UI question

2007-08-02 Thread Igor Tandetnik
Scott Derrick <[EMAIL PROTECTED]> wrote: When using the command line interface sqlite3, a couple of times I have forgotten to use the "." before a command. After that I get a "...>" prompt that I can't seem to escape from and accepts no commands? My only choice is to shut down that terminal

Re: [sqlite] UI question

2007-08-02 Thread Dan Kennedy
On Thu, 2007-08-02 at 08:21 -0600, Scott Derrick wrote: > This is probably a stupid question but has frustrated me a couple of times. > > When using the command line interface sqlite3, a couple of times I have > forgotten to use the "." before a command. After that I get a "...>" > prompt

Re: [sqlite] UI question

2007-08-02 Thread drh
Scott Derrick <[EMAIL PROTECTED]> wrote: > This is probably a stupid question but has frustrated me a couple of times. > > When using the command line interface sqlite3, a couple of times I have > forgotten to use the "." before a command. After that I get a "...>" > prompt that I can't seem

RE: [sqlite] UI question

2007-08-02 Thread Griggs, Donald
-Original Message- From: Scott Derrick [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 10:22 AM To: sqlite-users@sqlite.org Subject: [sqlite] UI question This is probably a stupid question but has frustrated me a couple of times. When using the command line interface

[sqlite] UI question

2007-08-02 Thread Scott Derrick
This is probably a stupid question but has frustrated me a couple of times. When using the command line interface sqlite3, a couple of times I have forgotten to use the "." before a command. After that I get a "...>" prompt that I can't seem to escape from and accepts no commands? My only

Re: [sqlite] UI question

2007-08-02 Thread P Kishor
just enter a ; (semi-colon) to indicate that you have ended your command. SQLite will complain, and then will let you pick up and continue. On 8/2/07, Scott Derrick <[EMAIL PROTECTED]> wrote: > This is probably a stupid question but has frustrated me a couple of times. > > When using the command

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-02 Thread Christian Smith
Lokesh Babu uttered: Hi Smith, Is there any way where I can free the old pages and without using rollback feature. Because I'm much concerned about memory usage. As soon as I delete some records, It should free up the memory. Use a libc that has a malloc implementation that releases excess

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-02 Thread Scott Derrick
are you saying this is a memory leak? sqlite never gives back the unused memory? Christian Smith wrote: Lokesh Babu uttered: Hello Folks, When I perform the DELETE operation on a Table using In-Memory Database (":memory:"), the memory usage increases. I tried using PRAGMA auto_vacuum=1;

[sqlite] extension-functions.tgz for sqlite3 3.4.1 ?

2007-08-02 Thread Paul Harris
Hi, I wanted to get a LOG10() function in sqlite3, and I found the extension-functions.tgz file in http://sqlite.org/contrib I am using the all-in-one sqlite3.h/c version of sqlite3, and the extension-functions files don't seem to fit at all. For example, it wants to call a function called

Re: [sqlite] In-Memory Database: Delete rows on a Table increases the memory usage.

2007-08-02 Thread Lokesh Babu
Hi Smith, Is there any way where I can free the old pages and without using rollback feature. Because I'm much concerned about memory usage. As soon as I delete some records, It should free up the memory. Thanks On 8/1/07, Christian Smith <[EMAIL PROTECTED]> wrote: > > Lokesh Babu uttered: >