Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Update and Join

RE: Update and Join

From: TIm Tim <t1alf_oracle_at_yahoo.com>
Date: Mon, 30 Jun 2003 02:49:05 -0700
Message-ID: <F001.005BBFD4.20030630022451@fatcity.com>

In my opinion, you can try this one. Make a view that joined ITEMLOC and ITEMMAST, and then, you can update that view. Automatically the field "PREFER_BIN" will be updated too.
 

I still using SQL Server 2000, the syntax is like this.
 

CREATE VIEW <view_name> as
 

select ItemLoc.Prefer_bin,ItemMast.Item,ItemMast.Inven_Majcl from ItemLoc inner join ItemMast on ItemLoc.Item = ItemMast.Item
 

And then try to execute this command:
 

update <view_name> SET  ITEMLOC.PREFER_BIN='PATEN-A'  where Inven_Majcl = 'A' and ItemLoc.Prefer_Bin = 'FICTICI'
 

Sinardy Xing <[EMAIL PROTECTED]> wrote:

Hi Castro,
 

Can you set your font size bigger? You are not lawyer right?
 

may be this can help you....
 

UPDATE table SET column = something_new
WHERE primary_key_or_just_key in (select foreign_or_primary_key as usual) AND other_key in (other select foreign_or_primary_key as usual); 
 

Sinardy

-----Original Message-----From: Teresita Castro [mailto:[EMAIL PROTECTED]Sent: 28 June 2003 06:44To: Multiple recipients of list ORACLE-LSubject: Update and Join

I am trying to make and update that have a Join.
 

UPDATE ITEMLOC       INNER JOIN ITEMMAST ON ITEMLOC.ITEM = ITEMMAST.ITEM
 

SET  ITEMLOC.PREFER_BIN='PATEN-A' 
 

WHERE     (ITEMMAST.INVEN_MAJCL = 'A' AND ITEMLOC.PREFER_BIN='FICTICI')
 

But I don't have the right sintaxis, did some one knows how to do this or if is posible do a join in a update statement? Thanks!!!Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger Received on Mon Jun 30 2003 - 04:49:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US