Re: ORA-01008 in MERGE statement in 10gR3

From: samdba <oracleingres_at_yahoo.com>
Date: Mon, 2 Jun 2008 10:52:53 -0700 (PDT)
Message-ID: <3b6abe92-702e-4cbe-8e6b-ae5d1ae58f08@v26g2000prm.googlegroups.com>


On May 30, 8:53 pm, t..._at_panix.com (Dan Blum) wrote:
> samdba <oracleing..._at_yahoo.com> wrote:
> > CREATE OR REPLACE
> > PROCEDURE TEST_PROC AS
> > v_proc varchar2(4000);
> > mycol number := 10 ;
> > BEGIN
> > v_proc := ' merge into test a using test1 b on (a.col1=b.col1) when
> > matched then ';
> > v_proc := v_proc||' update set col2 = :col2 ';
> > v_proc := v_proc||' when not matched then ';
> > v_proc := v_proc||' insert (col1, col2) values ( b.col1, :col2) ';
> > begin
> > execute immediate v_proc using mycol ;
>
> You have two bind variables and are only providing one value. Oracle does
> not care about the names of the bind variables and so does not know that you
> want to use the same value for each.
>
> --
> _______________________________________________________________________
> Dan Blum t..._at_panix.com
> "I wouldn't have believed it myself if I hadn't just made it up."

Oops. My bad. Thanks for your input. It works fine now.

Thanks

Sam Received on Mon Jun 02 2008 - 12:52:53 CDT

Original text of this message