John O'Neill wrote:
Hi Dennis,
Thanks for the reply. In the original "INSERT" commands, my intention was to update a field in the
columns as they were being copied to the new table. Sorry, I didn't mean just "SELECT ... WHERE
id=1" as the only condition...I'd like to select those items and upda
O'Neill [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 3:48 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Is this possible in SQLite?
Hi Dennis,
Thanks for the reply. In the original "INSERT" commands, my intention
was to update a field in the columns as they were bein
her
unique value.
I guess this question is can I combine an UPDATE...SET with an INSERT...SELECT
command?
Thanks,
John
-Original Message-
From: Dennis Cote [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 4:32 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Is this possible
John O'Neill wrote:
Hello all,
I have a fairly simple DB with two tables. I'm trying to combine a SELECT and
UPDATE command, if it is possible:
CREATE TABLE a (id PRIMARY KEY, data INT);
CREATE TABLE b (id INT, data INT);
INSERT INTO a VALUES( 1, 100 );
INSERT INTO b VALUES( 1, 101 );
INSERT INTO
> Is there a way to do the following:
>
> INSERT INTO acopy SELECT * FROM a WHERE id = 1 ( SET id = some value X );
> INSERT INTO bcopy SELECT * FROM b WHERE id = 1 ( SET id = X );
http://www.sqlite.org/lang_insert.html
sql-statement ::= INSERT [OR conflict-algorithm] INTO
[dat
Hello all,
I have a fairly simple DB with two tables. I'm trying to combine a SELECT and
UPDATE command, if it is possible:
CREATE TABLE a (id PRIMARY KEY, data INT);
CREATE TABLE b (id INT, data INT);
INSERT INTO a VALUES( 1, 100 );
INSERT INTO b VALUES( 1, 101 );
INSERT INTO b VALUES( 1, 102
6 matches
Mail list logo