Re: [sqlite] Re: How do I do this

2008-01-13 Thread miguel manese
On Jan 14, 2008 9:09 AM, Vishal Mailinglist <[EMAIL PROTECTED]> wrote: > > sno | id | amount > > > 1| 1 | 200 > > > 2| 1 | 300 > > > 3 | 2 | 100 > > > 4 | 2 | 100 > > > 5 | 1 | 500 > What if I do not have control over sno i.e it is random or unpredictable , > I want to subtract it in

Re: [sqlite] any way to SELECT the 100th-104th row of a table?

2007-10-07 Thread miguel manese
select * from table limit (n-1),(m-n) n-1 because it is 0-based On 10/8/07, Adam Megacz <[EMAIL PROTECTED]> wrote: > > Hello. This is probably a stupid question, but... > > Is there any way to include some phrase in a SELECT clause that will > match only

Re: [sqlite] Re: auto_increment - why does it do the opposite?

2007-08-09 Thread miguel manese
Igor has answered this before. Roughly: 1. all tables has an implicit integer column named "rowid" that is auto increment 2. creating an integer primary key effectively "renames" rowid to that column, so in your case below fields id and rowid are the same IIRC drh replied something else, and

Re: [sqlite] Saving an in-memory database to file

2007-07-25 Thread miguel manese
Or, attach then INSERT-SELECT On 7/25/07, Mohd Radzi Ibrahim <[EMAIL PROTECTED]> wrote: How about dumping and import into new db? - Original Message - From: "Colin Manning" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 25, 2007 7:05 AM Subject: [sqlite]

Re: [sqlite] Syntax help with UPDATE in SQLite Database Browser

2007-06-07 Thread miguel manese
Maybe you really have to loop "outside" sqlite to align the rows & values. From the result you got and the UPDATE documentation, I can guess that the subselect in the assignment is flattened to a scalar. Unfortunately sqlite does not have something like update tbl1 set col=tbl2.col from tbl2

Re: [sqlite] Longest "real" SQL statement

2007-05-10 Thread miguel manese
I am the author of the package SQLiteDF for R (a statistical package), some sort of sqlite backed "data set". It's "raison d'etre" is to deal with very large datasets, which could be tables with thousands of columns. I am not much on the infinite length sql statement, but I need lots of columns

Re: [sqlite] Newbee Question

2007-04-04 Thread miguel manese
You have to link against sqlite's shared lib, e.g. in linux $ gcc -L/path/to/sqlite/stuffs -I/path/to/sqlite/stuffs -lsqlite prog.c (the 2nd is a capital i, the 3rd a small L) Cheers, M. Manese On 4/4/07, nshaw <[EMAIL PROTECTED]> wrote: I upgraded from to Up till now,

Re: [sqlite] Using AVG() Correctly

2007-02-21 Thread miguel manese
On 2/22/07, Rich Shepard <[EMAIL PROTECTED]> wrote: However, I'm stuck on the proper SQL syntax. A nudge in the right direction -- including pointers to the appropriate documentation -- would be much appreciated. The "rule of thumb" is that anything that appears in the group-by clause can

Re: [sqlite] about default file permission of SQLite database file

2007-02-21 Thread miguel manese
This is not actually about SQLite. man umask M. Manese On 2/22/07, Shan, Zhe (Jay) <[EMAIL PROTECTED]> wrote: Hi, If to use SQLite to create a database in Linux, the database file will be granted permission 644 as default. Is this value hardcoded in the current version? Is it possible to

Re: [sqlite] Restrictions on table names

2007-02-19 Thread miguel manese
There is almost no restrictions, just put it inside square brackets create table foobar ([my $0.02 column] int, ...) M. Manese On 2/20/07, Pablo Santacruz <[EMAIL PROTECTED]> wrote: I'd like to know if there is any restriction on table names. Thanks in advance -- Pablo