Im calling a script that uses dynamic sql. Im passing in a value as well. I keep getting
SP2-0552: Bind variable "2" not declared. Here is a code snipped declare v_var1 Varchar2(30) := 'TEST'; v_var2 VARCHAR2(30) := '&1'; total number; begin execute immediate ' Select * ' || ' from user_objects '|| ' where object_name = :1 '|| ' or object_name = :2 '|| using v_var1,v_var2 into total; end; / I call it as follows: @script HELLO -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: <[EMAIL PROTECTED] INET: [EMAIL PROTECTED] Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).