Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E97A39FB2FE for ; Fri, 9 Feb 2007 10:37:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 47557-01-6 for ; Fri, 9 Feb 2007 10:37:33 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web36203.mail.mud.yahoo.com (web36203.mail.mud.yahoo.com [209.191.68.229]) by postgresql.org (Postfix) with SMTP id 879299FB41A for ; Fri, 9 Feb 2007 10:15:05 -0400 (AST) Received: (qmail 94545 invoked by uid 60001); 9 Feb 2007 14:15:04 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=llC4ZV+wmRHblFP0fqvft2GBPw/gI3UR3BWYs9c9BDckig2ba+UbRL+nnssumxrDaCL93QdWaSwUI94Dq2XXEbPEQoFrypBZv4Mke8C9rSahWnmTiAWV2o1mCrjphigigs4Yj6XuN8n4P0vymEXE7OKes6G8vEkNAB8NmV9Tn9o=; X-YMail-OSG: S8f2hdYVM1kpNGg_UDs4MfqSF4ecCXS6u1jPyf6yjikB7sU5SlwFU0vQIYnoxW84QOfOMDUuSUKqa8_uFWkrH.ITZRnR4SQiRZb.gwdVmThQ70CAyUwszu76zuDTCxeS1VJRam5ASQr2P6KLxrARr7kC0q4ZgXV4Km9l5PUsoGA5KvgtKD.XhIqMKLbH Received: from [200.47.93.6] by web36203.mail.mud.yahoo.com via HTTP; Fri, 09 Feb 2007 08:15:03 CST Date: Fri, 9 Feb 2007 08:15:03 -0600 (CST) From: Gabriel Adolfo Sirni Subject: dynamic sql To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <50958.92462.qm@web36203.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.615 tagged_above=0 required=5 tests=BAYES_20, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS X-Spam-Level: ** X-Archive-Number: 200702/118 X-Sequence-Number: 27452 Error using the command EXECUTE IMMEDIATE with an OUT parameter Example: I have this procedure pr_prueba, who call other procedure "pr_out_area_code" using the command execute immediate, who has an IN paramter and an OUT paramter. Procedure pr_prueba(param in varchar2) is v_name varchar2(50); BEGIN EXECUTE IMMEDIATE ' Begin pr_out_area_code(:1,:2); End; ' USING param, OUT v_name; END; When I execute the procedure pr_prueba begin pr_prueba('3491'); end; The result is the following ERROR: EDB-42601: syntax error at or near "$1" at character 14 QUERY: SELECT out $1 LINE 1: SELECT out $1 I had make another test without an OUT parameter and it works fine, but when I include an OUT parameter it dosen't work. Gabriel Adolfo Sirni __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.espanol.yahoo.com/