Subject | RE: [firebird-support] what is it wrong in this query? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2008-11-27T06:52:12Z |
Unless Fabio wants to set FRN_CODICE of those records of ART that doesn't have a matching record in FRNA to NULL, then the full statement would be
UPDATE ART
SET FRN_CODICE =
(SELECT FRN_CODICE FROM FRNA WHERE FRNA.CODICE = ART.CODICE)
where exists
(SELECT * FROM FRNA WHERE FRNA.CODICE = ART.CODICE)
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Marcin Bury
Sent: 26. november 2008 16:28
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] what is it wrong in this query?
UPDATE ART
SER FRN_CODICE = (SELECT FRN_CODICE FROM FRNA WHERE FRNA.CODICE =
ART.CODICE)
is that what you want?
Marcin
Codebue Fabio - P-Soft pisze:
UPDATE ART
SET FRN_CODICE =
(SELECT FRN_CODICE FROM FRNA WHERE FRNA.CODICE = ART.CODICE)
where exists
(SELECT * FROM FRNA WHERE FRNA.CODICE = ART.CODICE)
Set
-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Marcin Bury
Sent: 26. november 2008 16:28
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] what is it wrong in this query?
UPDATE ART
SER FRN_CODICE = (SELECT FRN_CODICE FROM FRNA WHERE FRNA.CODICE =
ART.CODICE)
is that what you want?
Marcin
Codebue Fabio - P-Soft pisze:
> what is it wrong in this query?
>
>
> update ART
> inner JOIN FRNA ON ART.CODICE = FRNA.codice
> SET ART.frn_codice = FRNA.frn_codice
>
> I can't make an update on some field using data from other table in this
> way, isn't it?
>
>
> fab10
> .-----------------------------.