Subject Re: {Disarmed} [firebird-support] Firebird 1.5 - Stored procedure error 804
Author Nando
Thank you for posting.

I'll do it that way. I'm worried because I realize that I will need many joins to get the results I need with this stored procedured.

By the way, do you know how many joins does support a single SQL statement?

Nando.

--- In firebird-support@yahoogroups.com, Thomas Clarke <thomas.p.clarke@...> wrote:
>
> On Mon, Jun 20, 2011 at 8:41 PM, SoftTech <miket@...> wrote:
>
> > **
> >
> >
> > SELECT * FROM GET_CBXPAR_DATA(:P_TABLA, :P_CODIGO)
> >
> > Mike
> >
> > ----- Original Message -----
> > From: Nando
> > To: firebird-support@yahoogroups.com
> > Sent: Monday, June 20, 2011 6:39 PM
> > Subject: {Disarmed} [firebird-support] Firebird 1.5 - Stored procedure
> > error 804
> >
> > Hi to all.
> >
> > I'm writing a stored procedure like this:
> >
> > CREATE PROCEDURE get_cbxpar_data (
> > p_tabla varchar(10),
> > p_codigo varchar(2))
> > RETURNS (my_data varchar(64))
> > AS BEGIN
> > FOR SELECT descripcion
> > FROM m_cbxpar
> > WHERE tabla = :p_tabla AND codigo = :p_codigo
> > INTO :my_data
> > DO
> > SUSPEND;
> > END
> >
> > But when I execute this statement:
> >
> > SELECT ctaid, my_date, some_data, get_cbxpar_data ('IndEstAct', '1')
> > FROM my_table;
> >
> > Raises a SQL error code = -804
> > Function unknown
> > GET_CBXPAR_DATA
> >
> > What am I doing wrong?
> >
> > Any help will be appreciated,
> >
> > Nando.
> >
> > --
> > MailScanner Virus/Spam/Malware: PASS (GZ)
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
>
> Try
>
> SELECT some_data
> FROM get_cbxpar_data ('IndEstAct', '1')
>
> You will need to do a join to get at the other columns ctaid and some_data
>
> Hope this helps.
>
> --
> Thomas Clarke
> Cyber Sea Incorporated
> #6 Kingston Terrace
> Flint Hall
> St. Michael
> Barbados BB11070
>
> voice: (246) 234-9692
> email: tclarke@...
> web: http://cybersea.biz
>
>
> [Non-text portions of this message have been removed]
>