Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 concatenate

Author  Topic 

Shelly1
Starting Member

25 Posts

Posted - 2009-09-16 : 11:21:18
Hi I would like to concatenate eastings and northings to get an OS grid reference eg:

Easting Northing
102345 67891001

OS Grid Ref
10234567891001

Can anybody help please

Mich

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-16 : 12:10:07
Which datatype are the columns Easting and Northing?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-16 : 12:15:16
something like
select coalesce(cast(Easting as varchar(15)),'') + coalesce(cast(Northing as varchar(15)),'') as [OS Grid Ref]
from...

Go to Top of Page

Shelly1
Starting Member

25 Posts

Posted - 2009-09-17 : 05:17:06
Excellent, that works brilliantly
Thanks for your help

Mich
Go to Top of Page
   

- Advertisement -