sql - Oracle Query - Missing Defines -


i created simple table:

create table tmp ("id" varchar2(20 byte)); 

then tried this:

declare   whatever varchar2(20) := :bananas; begin   merge tmp t using      (select whatever this_id dual) d    on (t.id = d.this_id)      when not matched        insert (id) values (d.this_id); end; 

and enter binds

enter image description here

and error:

error starting @ line : 1 in command - declare   whatever varchar2(20) := :bananas; begin   merge tmp2 t using      (select whatever this_id dual) d    on (t.id = d.this_id)      when not matched         insert (id) values (d.this_id); end; error report - missing defines 

i've had no luck figuring out wants. if replace ':bananas' value 'a' works, not when use variable , bind value. know whats wrong query? thanks.

oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit production pl/sql release 11.2.0.4.0 - production "core   11.2.0.4.0  production" tns ibm/aix risc system/6000: version 11.2.0.4.0 - production nlsrtl version 11.2.0.4.0 - production 

edit: i've noticed error not preventing data being merged correctly... error still concerning though

try adding slash after statement on line of own. highlight whole block , press f5.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -