Subject RE : [ib-support] Datatype uknown error in a stored proc
Author Joseph Osende
Thank you, Helen !



I’ll follow you advise.



Joseph Osende

BP 5975

Pointe-Noire

Rép. du Congo



Tél : +242 670808

Mail : osendej@...

-----Message d'origine-----
De : Helen Borrie [mailto:helebor@...]
Envoyé : samedi 10 mai 2003 03:30
À : ib-support@yahoogroups.com
Objet : Re: [ib-support] Datatype uknown error in a stored proc



At 01:56 PM 9/05/2003 +0100, you wrote:

>I’m using Firebird 1.0.2.
>Could you please tell what’s wrong with the following code in a stored
>proc :
>
>…
>
>declare variable entie integer ;
>…
>entier = 10 ;
>….
>
>insert into sometable select atable.field1, :entier, atable.fieldn from
>atable
>
>I’ve tried to cast ( :entier as integer )
>
>And always received the Datatype uknown error.

Joseph,

First, you would be well-advised to specify an input column list for an
insert statement in ANY case where there is not exact column mapping to a
table.

Most importantly, the documentation quite clearly states you cannot pass
either a parameter or a variable in the field list of the SELECT (see
INSERT in the Language Reference).

Read the input set in a FOR SELECT...INTO...<variables> loop and perform an
ordinary INSERT INTO ATABLE (<column-list>) VALUES (<value-list>)
statement, including your variable as a member of the value-list at each
iteration of the loop.

cheers,
heLen








Yahoo! Groups Sponsor


<http://rd.yahoo.com/M=249982.3179269.4495679.1261774/D=egroupweb/S=1705115386:HM/A=1524963/R=0/*http:/hits.411web.com/cgi-bin/autoredir?camp=556&lineid=3179269%e2%88%9d=egroupweb&pos=HM>


<http://us.adserver.yahoo.com/l?M=249982.3179269.4495679.1261774/D=egroupmail/S=:HM/A=1524963/rand=956390583>


To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service.



[Non-text portions of this message have been removed]