pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gabriel Adolfo Sirni <gsirni@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: dynamic sql
Date: Fri, 9 Feb 2007 08:15:03 -0600 (CST)
Message-ID: <50958.92462.qm@web36203.mail.mud.yahoo.com> (raw)

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/ 



view thread (5+ messages)  latest in thread

Message-ID: <50958.92462.qm@web36203.mail.mud.yahoo.com>
Permalink:  ../50958.92462.qm@web36203.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/50958.92462.qm@web36203.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gsirni@yahoo.com
  Subject: Re: dynamic sql
  In-Reply-To: <50958.92462.qm@web36203.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox