On MSSQL 2000, try this

 SELECT     billToAddress1 + ' ' + isnull(billToAddress2,'') AS billToAddress
FROM       tbl_orderHeader_archive

-----Original Message-----
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 01, 2005 11:11 AM
To: CF-Talk
Subject: SOT: SQL Concatenation

Sorry for this, but I've lost my mind this morning. Please is someone could 
tell me how to do this I would be forever grateful.

SELECT     billToAddress1 + ' ' + billToAddress2 AS billToAddress
FROM       tbl_orderHeader_archive

If the billToAddress2 column is null or empty this select statement returns 
empty. Can someone please tell me how to have it return the billToAddress1 and 
billToAddress2 concatenated even if the billToAddress2 is empty or null?

Thanks
Bryan




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to