Subject Re: Calculated Fields
Author Adam
--- In firebird-support@yahoogroups.com, "Robert Cave" <bobhcave@d...>
wrote:
> hi all
> How cani join two fields together
> like FIRSTNAME + LASTNAME = FIRSTLAST
> John
> Smith
>
> = JOHN SMITH
> TIA
>
> Robert

Use || instead of +

Assuming you want a space between the names

FIRSTNAME || ' ' || LASTNAME

You can use this inside a query

eg

SELECT FIRSTNAME || ' ' || LASTNAME AS FIRSTLAST
FROM EMPLOYEE

or inside a trigger or stored procedure

FIRSTLAST = :FIRSTNAME || ' ' || :LASTNAME;

or you can created a computed field called FIRSTLAST with that formula
(I am too lazy to open the book, but you can look up how to define
computed fields)

Adam