Subject | Re: Calculated Fields (OT) Yahoo threads gone crazy |
---|---|
Author | Adam |
Post date | 2005-09-28T23:50:25Z |
Something odd with yahoo, it hasn't attached any replies to the
original message. Sorry to those who received the same response 10
times ;)
Adam
original message. Sorry to those who received the same response 10
times ;)
Adam
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...> wrote:
> --- 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