Re: Inserting data of two other tables [Now deleting ...] - Mailing list pgsql-novice

From papapep
Subject Re: Inserting data of two other tables [Now deleting ...]
Date
Msg-id 3ED4EADC.6040108@gmx.net
Whole thread Raw
Responses Re: Inserting data of two other tables [Now deleting ...]
MD5 salt
List pgsql-novice
Well, at last I've been able (with some help ;-D) to do it.

The query has been:

SELECT tarneto FROM detalltrajectes d WHERE d.journey = (SELECT c.pkey
FROM CAPTRAJECTES WHERE c.pkey = d.journey AND fecha = 20030423);

With this one I've been able to "see" what was I going to remove, and
with this one:

DELETE FROM DETALLTRAJECTES WHERE journey = (SELECT pkey FROM
CAPTRAJECTES WHERE pkey = journey AND fecha = 20030423);

I have removed the rows. I have to mention that I first tried to "clone"
the query, changing SELECT tarneto for DELETE obviously, but it didn't
work. The parser said:

    ERROR:  parser: parse error at or near "d"

So what I did was to remove all the alias and it worked.... is it normal??

Thanks to all for your help, and specially to Nabil.

Josep Sànchez
   [papapep]





pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Create Table Unique problem... bug?
Next
From: eurlix
Date:
Subject: How to obtain a good ASCII order ?