Re: [sqlite] deleting a single row

2007-02-19 Thread P Kishor
On 2/20/07, P Kishor <[EMAIL PROTECTED]> wrote: On 2/19/07, Jim Crafton <[EMAIL PROTECTED]> wrote: > If I have a simple table without an index column, and have multiple > rows with the same data, is it possible to *only* delete one row? In > other words, is there anything like the LIMIT syntax

Re: [sqlite] deleting a single row

2007-02-19 Thread P Kishor
On 2/19/07, Jim Crafton <[EMAIL PROTECTED]> wrote: If I have a simple table without an index column, and have multiple rows with the same data, is it possible to *only* delete one row? In other words, is there anything like the LIMIT syntax that's found in the SELECT command for DELETEs? you

Re: [sqlite] deleting a single row

2007-02-19 Thread Dan Kennedy
On Tue, 2007-02-20 at 00:29 -0500, Jim Crafton wrote: > If I have a simple table without an index column, and have multiple > rows with the same data, is it possible to *only* delete one row? In > other words, is there anything like the LIMIT syntax that's found in > the SELECT command for

[sqlite] deleting a single row

2007-02-19 Thread Jim Crafton
If I have a simple table without an index column, and have multiple rows with the same data, is it possible to *only* delete one row? In other words, is there anything like the LIMIT syntax that's found in the SELECT command for DELETEs? Thanks, Jim

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

Re: [sqlite] query on match between application and sqlite

2007-02-19 Thread P Kishor
On 2/19/07, Eric S. Johansson <[EMAIL PROTECTED]> wrote: Joe Wilson wrote: >> 2) can I use it for a message store and have it run faster than a 1 >> message per file system? > > What does that mean? Is "file system" a unit of time? ack! bad sentence construction... comparing a system storing

Re: [sqlite] query on match between application and sqlite

2007-02-19 Thread Joe Wilson
> 1) need to know if sqlite can help me cut down on the number of little db's Sure. > 2) can I use it for a message store and have it run faster than a 1 > message per file system? What does that mean? Is "file system" a unit of time? You can store messages in BLOBs or as TEXT in an SQLite

Re: [sqlite] query on match between application and sqlite

2007-02-19 Thread Eric S. Johansson
Eric S. Johansson wrote: Again, I do most sincerely apologize for size of this request. I've spent 30 years avoiding databases and I guess this is payback. :-) Any advice, good online tutorials on SQL, or feedback would be valued. urk. I hate it when I forget to ask for what I need after

[sqlite] query on match between application and sqlite

2007-02-19 Thread Eric S. Johansson
I apologize if this comes across as a "do my homework for me" type of query but I'm in a bit of a bind and I'm trying to come up to some reasonable amount of knowledge in less than no time. I've been using ad hoc DBM files for a variety of small databases and well, it's crumbling. I'm seeing

Re: [sqlite] SQLite db lock problem

2007-02-19 Thread John Stanton
Allan, Mark wrote: Hi, A little while back I submitted a query as to whether SQLite would be a good alternative to using MS Access as an internal database for a PC application. I received many repiles for which I was grateful. Mostly people thought that SQLite was a far more superior option to

[sqlite] Restrictions on table names

2007-02-19 Thread Pablo Santacruz
I'd like to know if there is any restriction on table names. Thanks in advance -- Pablo

[sqlite] What query?

2007-02-19 Thread erw2
Hi, I have a table with a following data: IdNo1 No2 11001 11 21002 11 31003 12 41004 12 51004 12 61005 12 71006 13 81007 13 91008 14 ... ... Now, I would like to select only the rows when No2 change. So the

[sqlite] Re: Looking for equivalent syntax

2007-02-19 Thread Igor Tandetnik
Igor Tandetnik <[EMAIL PROTECTED]> wrote: update C1_credDerivEvent set CDEvent = CDEvent || ',' || (select b.CDEvent from C1_tmp_credDerivEvent b where C1_credDerivEvent.CDId = b.CDId) where exists ( select * from C1_tmp_credDerivEvent b, tmp_events c where

RE: [sqlite] Re: Looking for equivalent syntax

2007-02-19 Thread Anderson, James H \(IT\)
Thanks! I'll give it a try. -Original Message- From: Igor Tandetnik [mailto:[EMAIL PROTECTED] Sent: Monday, February 19, 2007 2:04 PM To: SQLite Subject: [sqlite] Re: Looking for equivalent syntax Anderson, James H (IT) wrote: > I'm trying to convert the following statement in Sybase

Re: [sqlite] Looking for equivalent syntax

2007-02-19 Thread P Kishor
On 2/19/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: The original statement works fine in Sybase. I did not try it in Sqlite because my previous experience is that the update statement in Sqlite does not support the "from" clause. Am I missing something here? no, seems like it indeed

[sqlite] Re: Looking for equivalent syntax

2007-02-19 Thread Igor Tandetnik
Anderson, James H (IT) wrote: I'm trying to convert the following statement in Sybase syntax into the equivalent sqlite syntax: update C1_credDerivEvent set a.CDEvent = a.CDEvent || ',' || b.CDEvent from C1_credDerivEvent a, C1_tmp_credDerivEvent b, tmp_events

[sqlite] Re: Looking for equivalent syntax

2007-02-19 Thread Igor Tandetnik
P Kishor <[EMAIL PROTECTED]> wrote: What is wrong with your original statement? You never mentioned whether that worked on not... did you try it? (listed again below) Well, have _you_ tried it? SQLite doesn't support this syntax. You could update it to the more standard-ish syntax like so

RE: [sqlite] Looking for equivalent syntax

2007-02-19 Thread Anderson, James H \(IT\)
The original statement works fine in Sybase. I did not try it in Sqlite because my previous experience is that the update statement in Sqlite does not support the "from" clause. Am I missing something here? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [sqlite] Looking for equivalent syntax

2007-02-19 Thread P Kishor
On 2/19/07, Anderson, James H (IT) <[EMAIL PROTECTED]> wrote: I'm trying to convert the following statement in Sybase syntax into the equivalent sqlite syntax: update C1_credDerivEvent set a.CDEvent = a.CDEvent || ',' || b.CDEvent from C1_credDerivEvent a, C1_tmp_credDerivEvent

[sqlite] Looking for equivalent syntax

2007-02-19 Thread Anderson, James H \(IT\)
I'm trying to convert the following statement in Sybase syntax into the equivalent sqlite syntax: update C1_credDerivEvent set a.CDEvent = a.CDEvent || ',' || b.CDEvent from C1_credDerivEvent a, C1_tmp_credDerivEvent b, tmp_eventsc where a.CDId= b.CDId

[sqlite] SQLite db lock problem

2007-02-19 Thread Allan, Mark
Hi, A little while back I submitted a query as to whether SQLite would be a good alternative to using MS Access as an internal database for a PC application. I received many repiles for which I was grateful. Mostly people thought that SQLite was a far more superior option to Access, the main

Re: [sqlite] Binary data in SQLite3

2007-02-19 Thread jose isaias cabrera
Thanks. - Original Message - From: "Roger Binns" <[EMAIL PROTECTED]> To: Sent: Monday, February 19, 2007 1:51 AM Subject: Re: [sqlite] Binary data in SQLite3 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jose isaias cabrera wrote: Can SQLite3 save binary

Re: [sqlite] Binary data in SQLite3

2007-02-19 Thread jose isaias cabrera
thanks. - Original Message - From: "P Kishor" <[EMAIL PROTECTED]> To: Sent: Monday, February 19, 2007 1:36 AM Subject: Re: [sqlite] Binary data in SQLite3 On 2/19/07, jose isaias cabrera <[EMAIL PROTECTED]> wrote: Greetings! Can SQLite3 save binary

RE: [sqlite] Re: What is wrong with this SELECT CASE statement?

2007-02-19 Thread RB Smissaert
Got this worked out now and in fact it looks a big case statement is a bit faster than the other methods. I also found that I don't need the CAST AS INTEGER: UPDATE A2ID965_J SET DATE_OF_BIRTH = CASE (DATE_OF_BIRTH / 100) % 100 WHEN 1 THEN 'January' WHEN 2 THEN 'February'

Re: [sqlite] compare open table and attached database table

2007-02-19 Thread Rich Shepard
On Sun, 18 Feb 2007, fangles wrote: Thank you Igor, that's fantastic. I'm reading lots of SqLite tutorials but a lot of the SQL is so far out of my brain's reach that it doesn't make sense to me. And I love to play:):):) Look at Joe Celko's books on SQL. He tries to be useful for all

Re: [sqlite] SQL request. Sign "-" as NOT LIKE

2007-02-19 Thread Cecilia VIGNY
[EMAIL PROTECTED] a écrit : Cecilia VIGNY <[EMAIL PROTECTED]> wrote: Hi everybody, I'm building a SQL request in order to question my SQLite database from my php program. I would be happy if this request were compatible with a MySQL database ;o) So what I want to know is if we can use

Re: [sqlite] SQL request. Sign "-" as NOT LIKE

2007-02-19 Thread drh
Cecilia VIGNY <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I'm building a SQL request in order to question my SQLite database from > my php program. I would be happy if this request were compatible with a > MySQL database ;o) So what I want to know is if we can use the minus > sign as we can

Re: [sqlite] sqlite: current_time is off

2007-02-19 Thread drh
Joe Wilson <[EMAIL PROTECTED]> wrote: > --- P Kishor <[EMAIL PROTECTED]> wrote: > > On 2/18/07, Neil McLeod <[EMAIL PROTECTED]> wrote: > > > I just started using SQLite, and it seems my timestamps are all 5 hours > > > ahead of time (i.e. "select current_time" gives me 0:47 when it is > > >

Re: [sqlite] Search all collumns with LIKE at once

2007-02-19 Thread fangles
Martin Jenkins-2 wrote: > > fangles wrote: >> PK? I'm sorry but I am not familiar with that term.. > > Sorry, in this example a Primary Key is a column (eg an integer) which > uniquely specifies a row in a table. > > In the example above you: > > select all columns from the rows which

[sqlite] SQL request. Sign "-" as NOT LIKE

2007-02-19 Thread Cecilia VIGNY
Hi everybody, I'm building a SQL request in order to question my SQLite database from my php program. I would be happy if this request were compatible with a MySQL database ;o) So what I want to know is if we can use the minus sign as we can do with the index fulltext in MySQL. For instance,

Re: [sqlite] Search all collumns with LIKE at once

2007-02-19 Thread Martin Jenkins
fangles wrote: PK? I'm sorry but I am not familiar with that term.. Sorry, in this example a Primary Key is a column (eg an integer) which uniquely specifies a row in a table. In the example above you: select all columns from the rows which have a PK in the set ( select the PK from

Re: [sqlite] Search all collumns with LIKE at once

2007-02-19 Thread fangles
Martin Jenkins-2 wrote: > > fangles wrote: >> I'm currently searching through all columns in a table to see if any >> match >> the search text and the query is rather cumbersome. Is there a way to use >> a >> loop to go through all available columns by some means? Maybe a loop by >> querying

Re: [sqlite] Search all collumns with LIKE at once

2007-02-19 Thread fangles
Martin Jenkins-2 wrote: > > fangles wrote: >> I'm currently searching through all columns in a table to see if any >> match >> the search text and the query is rather cumbersome. Is there a way to use >> a >> loop to go through all available columns by some means? Maybe a loop by >> querying