Subject | RE: [firebird-support] Concatenation of fields |
---|---|
Author | Thomas Steinmaurer |
Post date | 2003-11-12T07:49:37Z |
> How do I concatenate two fields in a select statement with extra charcatersUse the double pipe symbol ||.
> ? the following all throw errors.
>
> SELECT Field1 + '(' + Field2 + ')'
> FROM Table;
>
> SELECT Field1 & '(' & Field2 & ')'
> FROM Table;
>
> SELECT Field1 + "("+ Field2 + ")"
> FROM Table;
>
> SELECT Field1 & "(" & Field2 & ")"
> FROM Table;
>
> SELECT CONCAT(Field1,Field2)
> FROM Table;
SELECT Field1 || '(' || Field2 || ')'
Be aware, if one of the arguments is NULL, the entire concatenation
will be NULL.
Best Regards,
Thomas Steinmaurer
Logging/Auditing Suites for InterBase, Firebird and Advantage Database Server
http://www.iblogmanager.com
http://www.adslogmanager.com