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

Home -> Community -> Usenet -> c.d.o.server -> Re: Update error...!

Re: Update error...!

From: pal <jayadevpaleri_at_gmail.com>
Date: Mon, 19 Nov 2007 04:30:09 -0800 (PST)
Message-ID: <16e7f774-fc47-4064-802e-2010cf3e00be@e6g2000prf.googlegroups.com>


On Nov 19, 3:43 pm, Maxim Demenko <mdeme..._at_gmail.com> wrote:
> pal schrieb:
>
>
>
>
>
> > UPDATE paywork
> > SET ot1_hrs = 0,
> > ot1_amount = 0,
> > ot2_hrs = 0,
> > ot2_amount= 0,
> > ot3_hrs= 0,
> > FROM paywork,
> > emp_master
> > WHERE ( paywork.emp_code = emp_master.emp_code ) AND
> > ( emp_master.loc_cd like :is_loc_cd ) ;
>
> > this code is giving me error..
>
> > Whether i can use "From" in an update query? cos SQL plus is giving
> > an error message on that,
>
> > if i'm not using the from i cant check the condition on where clause.
>
> > Can any one tell me what i can do for this
>
> Probably, something like this should work for you:
>
> UPDATE paywork p
> SET ot1_hrs = 0,
> ot1_amount = 0,
> ot2_hrs = 0,
> ot2_amount= 0,
> ot3_hrs= 0
> WHERE EXISTS (
> SELECT null
> FROM emp_master e
> WHERE ( p.emp_code = e.emp_code )
> AND ( e.loc_cd like :is_loc_cd )
> )
>
> UPDATE syntax can be looked athttp://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statem...
>
> Best regards
>
> Maxim- Hide quoted text -
>
> - Show quoted text -

thank you maxim Received on Mon Nov 19 2007 - 06:30:09 CST

Original text of this message

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