Subject RE: [firebird-support] stored procedure, concatenate input parameters
Author Henrik Sitter
Thx :)

Henrik

-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: 12. januar 2004 21:46
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] stored procedure, concatenate input
parameters

Hi,

> Hi, I have a stored procedure with a couple of input parameters that I
> want to concatenate:
>
> In_param1 VarChar(100)
> In_param2 VarChar(100)
> .
> .
> .
> declare variable str VarChar(200)
>
>
> I was hoping I could do something like:
> str = In_param1 & In_param2;
>
> If In_param1 equals "Hello " and In_param2 equals "World", str should
> read "Hello World".
>
> This doesn't work. Could anyone help me with this?

Well, that might be related to the fact that "&" isn't the concatenation
operator :-)

Firebird uses the double pipe: || - as with the SQL standard.

str = In_Param || In_Param2;

Do note, that if one of the pieces to be concatenated IS NULL,
the result will be NULL as well.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
http://www.upscene.com





Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

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

Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/