2:25
To: SQLite Users
Subject: [sqlite] SQLite Update With CTE
Hi
I am rewriting an old Perl script that selectively updates data from
one
table to another using this statement:
UPDATE CUSTOMERS
SET
cust1= ?,
cust2= NULL,
street = ?,
town = ?,
postcode = ?
lot about anticipated traffic volume.
>-Original Message-
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of John McMahon
>Sent: Monday, 21 August, 2017 22:25
>To: SQLite Users
>Subject: [sqlite] SQLite Update With CTE
>
>Hi
John McMahon wrote:
> should be
> UPDATE CUSTOMERS -- remove 'as c'
> SET
> cust1= (select customer from test where custnum = CUSTOMERS.custnum),
> WHERE custnum IN (SELECT custnum FROM test)
Yes.
Regards,
Clemens
___
sqlite-users mailing list
On 22/08/2017 16:41, Clemens Ladisch wrote:
John McMahon wrote:
UPDATE CUSTOMERS as c
SET
cust1= (select customer from test where custnum = c.custnum),
cust2= NULL,
street = (select address from test where custnum = c.custnum),
town = (select town from tes
John McMahon wrote:
> UPDATE CUSTOMERS as c
> SET
> cust1= (select customer from test where custnum = c.custnum),
> cust2= NULL,
> street = (select address from test where custnum = c.custnum),
> town = (select town from test where custnum = c.custnum),
> post
Hi
I am rewriting an old Perl script that selectively updates data from one
table to another using this statement:
UPDATE CUSTOMERS
SET
cust1= ?,
cust2= NULL,
street = ?,
town = ?,
postcode = ?
WHERE custnum = ?
I am intending to replace it with something li
6 matches
Mail list logo