Groups > Interbase > Interbase SQL > Concatenation




Re: Concatenation

Re: Concatenation
16 Nov 2007 08:20:46 -0700
SimonW wrote:

> Alain wrote:
> > Hi,I wish to concatenate two fields in oneSELECT (lname + ', ' +
> > fname) AS  Name from clientsThe above is not working ! How to
> > ?Thanks
> SELECT (lname || ', ' || fname) AS Name

	Note that if either column is NULL then this returns NULL. Use CASE or
COALESCE to write a more robust solution.

-- 
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
  Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their 
Post Reply
Re: Concatenation
Fri, 16 Nov 2007 08:36:10 -080
Oracle uses || for concatenation, while SQL Server uses +

Go figure.

Post Reply
Re: Concatenation
16 Nov 2007 08:43:27 -0700
Zoren Lendry wrote:

> Oracle uses || for concatenation

	That is the SQL standard.

-- 
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
  Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
All the great TeamB service you've come to expect plus (New!) 
Post Reply
Re: Concatenation
Fri, 16 Nov 2007 11:17:14 +000
Alain wrote:
> Hi,I wish to concatenate two fields in oneSELECT (lname + ', ' + fname) AS

> Name from clientsThe above is not working ! How to ?Thanks 
> 
> 
Post Reply
Concatenation
Fri, 16 Nov 2007 15:12:08 +040
Hi,I wish to concatenate two fields in oneSELECT (lname + ', ' + fname) AS 
Name from clientsThe above is not working ! How to ?Thanks 

Post Reply
<< Previous 1 2 Next >>
( Page 1 of 2 )
about | contact