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


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


> 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
Upscene Productions

Yahoo! Groups Links

To visit your group on the web, go to:

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to: