[sqlite] ANNOUNCE: SHSQL - SQL for LINUX/UNIX Shell scripts

2004-11-04 Thread Eddy Macnaghten
Hi I have just released SHSQL under the GPL, it is a method how SQL can be easily intergrated into shell scripts. The web site is at http://www.edlsystems.com/shsql and can be downloaded from ftp://ftp.edlsystems.com/shsql (Needless to say a SQLite3 version is included) Enjoy Eddy -- Edward

Re: [sqlite] Get a table's primary key?

2004-10-05 Thread Eddy Macnaghten
rowid is alsways an alias for the primary key whether an "integer primary key" field was specified or not On Tue, 2004-10-05 at 18:57, Kirk Haines wrote: > Does the SQLite API (for either 2.x or 3.x versions of SQLite) offer > any way to determing which field, if any, in a table was created as an

Re: [sqlite] Schema of an attached database

2004-10-05 Thread Eddy Macnaghten
Wow - that was fast! Any plans for a 3.0.8? Eddy On Tue, 2004-10-05 at 16:44, D. Richard Hipp wrote: > Eddy Macnaghten wrote: > > This does not seem to work for 3.0.7 > > > > > >>Marc Pitoniak wrote: > >> > >>>To get the schema of

Re: [sqlite] Schema of an attached database

2004-10-05 Thread Eddy Macnaghten
This does not seem to work for 3.0.7 If you have a table named "t" in the main database, and you attach a database that has a table named t in it as attachdb, then pragma attachdb.table_info(t); still seems to give the info for the table t in the main database. Is this a bug or have I got it wr

Re: [sqlite] why remove sqlite_encode() ?

2004-10-04 Thread Eddy Macnaghten
If you use BLOBs I do not think you need sqlite_encode_binary and sqlite_decode_binary On Tue, 2004-10-05 at 02:30, [EMAIL PROTECTED] wrote: > Hello, > > I am new to sqlite. So far I've been very impressed by it. We > are using it as the backend of an open-source MAPI message store. > Still str

RE: [sqlite] SQL help

2004-10-04 Thread Eddy Macnaghten
On Tue, 2004-10-05 at 01:55, Eddy Macnaghten wrote: > > SELECT MAX(A) AS A, B, C > > FROM T > > GROUP BY B > > > > This is an invalid SQL statement (SQLite should generate an error here). > > The correct(tm) way to do this is with subqueries. > > ORA

RE: [sqlite] SQL help

2004-10-04 Thread Eddy Macnaghten
> SELECT MAX(A) AS A, B, C > FROM T > GROUP BY B > This is an invalid SQL statement (SQLite should generate an error here). The correct(tm) way to do this is with subqueries. ORACLE SQL (and others), using subqueries, you would use... select * from t where (a, b) in (select max(a), b from t g

Re: [sqlite] "library routine called out of space"

2004-10-01 Thread Eddy Macnaghten
Are you sure you do not mean "out of memory" ? That means a malloc failed. What are you calling sqlite3_prepare with? Especially what is the third argument? On Fri, 2004-10-01 at 01:06, Cory Nelson wrote: > Anyone know why I'd get that from an sqlite3_prepare()? -- Edward A. Macnaghten http:/

[sqlite] Database enumeration

2004-09-30 Thread Eddy Macnaghten
Hi Is there a way of either... (a) getting a list of databases attached (using attached command), or (b) Finding the database name used for any given table name name) For instance: If I have a statement "select * from fred", is there a way I can find out what database "fred" is on, or at least f

Re: [sqlite] OOo/SQLite, searching for a developer

2004-09-28 Thread Eddy Macnaghten
Have you looked at http://www.ch-werner.de/sqliteodbc/dba-sqlite-sdbc.html Eddy On Tue, 2004-09-28 at 22:25, M. Fioretti wrote: > On Fri, Aug 20, 2004 11:40:16 AM +0100, Sophie Gautier > ([EMAIL PROTECTED]) wrote: > > Hi all, > > > > This is my first mail here, so I'll introduce myself short

Re: [sqlite] Begin transaction at RESERVED lock level?

2004-09-24 Thread Eddy Macnaghten
I would suggest a dummy update or insert just after the BEGIN TRANSACTION that does not do anything meaningful, just creates the RESERVED lock. On Sat, 2004-09-25 at 00:30, b.bum wrote: > Is there a way to do a 'begin transaction' directly at the RESERVED > locking level? > > A typical usage pat

Re: [sqlite] Lock files....

2004-09-24 Thread Eddy Macnaghten
On Fri, 2004-09-24 at 16:50, Ara.T.Howard wrote: > On Fri, 24 Sep 2004, Eddy Macnaghten wrote: > > > There is no way I can guarantee the "nfs" to be good. Also, a mixture of > > Linux and Windows clients need to be allowed for, I do not know how SAMBA > > suppor

Re: [sqlite] Lock files....

2004-09-24 Thread Eddy Macnaghten
On Fri, 2004-09-24 at 14:51, Ara.T.Howard wrote: > On Fri, 24 Sep 2004, Eddy Macnaghten wrote: > > > However, reading the documentation it seems that SQLite is not hot on > > concurrent access through networks, or across platforms, due to the funnies > > of fcntl, or i

[sqlite] Lock files....

2004-09-23 Thread Eddy Macnaghten
Hi there I am new to this list, so please excuse me if this has been covered before, or is not the right place for this. I am writing a development language/environment that has a SQL back end. I am (planning to) put in a number of SQL engine connectivities, and SQLite is ideal for the low end t