Hi All

I am upgrading a SQL 7 database to SQL2008 R2 and just cannot undestand why 2008 has a problem with the code for this view (my experience with SQL 2008R2 is limited):

SELECT dbo.tbl_orgbusinessunits.BusAreaCode, dbo.tbl_orgbusinessunits.Region, dbo.tbl_orgbusinessunits.CompanyCode, dbo.tbl_orgbusinessunits.BusAreaCode & ' ' & dbo.tbl_orgbusinessunits.BusinessAreaName AS Branch, dbo.tbl_orgcompanies.CompanyCode & ' ' & dbo.tbl_orgcompanies.CompanyName AS Company
FROM dbo.tbl_orgbusinessunits INNER JOIN dbo.tbl_orgcompanies ON dbo.tbl_orgbusinessunits.CompanyCode = dbo.tbl_orgcompanies.CompanyCode

It seems to have a problem with the concatunated fields.

Any pointers will be appreciated.

Best Regards
Andrew

Recommended Answers

All 2 Replies

I think you just need to use +.

What is the error you are getting? I've also always used the + character when concatenation is needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.