Subject | Re: [firebird-support] how can i concatenate 2 columns inside a select? |
---|---|
Author | Helen Borrie |
Post date | 2005-01-03T14:18:10Z |
At 02:06 PM 3/01/2005 +0000, you wrote:
delimited by single quotes, so:
SELECT FISTNAME || ' ' || LASTNAME AS NAME FROM USERS
Watch out for nulls, too. If FISTNAME or LASTNAME is null in this
expression, then the whole expression will be null.
Please DO get hold of the Quick Start Guide from the Firebird web site. It
will alert you to several such behavours of SQL.
./hb
>how can i concatenate 2 columns inside a select?Yes. SQL concatentation uses the "double-pipe" symbol, and SQL strings are
>
>in FoxPro i was able to do something like this:
>SELECT FISTNAME+" "+LASTNAME AS NAME FROM USERS
>
>the result was ONE COLUMN made from the concatenation of
>FirstName,LastName and a blank space
>
>How can i do such thing in FireBird ?
delimited by single quotes, so:
SELECT FISTNAME || ' ' || LASTNAME AS NAME FROM USERS
Watch out for nulls, too. If FISTNAME or LASTNAME is null in this
expression, then the whole expression will be null.
Please DO get hold of the Quick Start Guide from the Firebird web site. It
will alert you to several such behavours of SQL.
./hb