Subject | RE: [firebird-support] what is it wrong in this query? |
---|---|
Author | Codebue Fabio - P-Soft |
Post date | 2008-11-27T09:00:02Z |
Set, Marcin
thanks a lot for your answer... it works!!! I use Set option ;)
fab10
.-----------------------------.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: Thursday, November 27, 2008 7:52 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] what is it wrong in this query?
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:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
thanks a lot for your answer... it works!!! I use Set option ;)
fab10
.-----------------------------.
-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Svein Erling Tysvær
Sent: Thursday, November 27, 2008 7:52 AM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] what is it wrong in this query?
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:
> 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
> .-----------------------------.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links