From oracle-l-bounce@freelists.org Tue Feb 1 00:11:42 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j116Bg0R025733 for ; Tue, 1 Feb 2005 00:11:42 -0600 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j116Bgem025729 for ; Tue, 1 Feb 2005 00:11:42 -0600 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 9EECA697D8; Tue, 1 Feb 2005 00:10:48 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05039-07; Tue, 1 Feb 2005 00:10:48 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2344668BC5; Tue, 1 Feb 2005 00:10:48 -0500 (EST) From: Lyndon Tiu To: oracle-l Subject: Re: PL/SQL - Use bind variable in "from " query Date: Mon, 31 Jan 2005 21:09:13 -0800 User-Agent: KMail/1.6.1 References: <200501312105.06794.ltiu@alumni.sfu.ca> In-Reply-To: <200501312105.06794.ltiu@alumni.sfu.ca> MIME-Version: 1.0 Content-Disposition: inline Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-Id: <200501312109.13156.ltiu@alumni.sfu.ca> X-archive-position: 15535 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: ltiu@alumni.sfu.ca Precedence: normal Reply-To: ltiu@alumni.sfu.ca X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on air891.startdedicated.com X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,HTML_MESSAGE, HTML_TAG_BALANCE_TABLE autolearn=no version=2.60 X-Spam-Level: On January 31, 2005 09:05 pm, Lyndon Tiu wrote: > The code: > > ------------ > declare: > > v_table_name varchar2 > > v_value varchar2 > > begin > > select table_name into v_table_name from lookup_table; > > select value into v_value from :v_table_name; > Slight typo: select value into v_value from :v_table_name where pk = 1; PL/SQL compiler complains about bad bind variable :v_table_name. Thanks. -- Lyndon Tiu -- http://www.freelists.org/webpage/oracle-l