views:

34

answers:

2

Hi, I'm using SQL Server 2008 R2 and I can't seem to be able to use the geography column type it's meant to have. It doesn't show up in the data type column when I create a new column and when I run this code:

CREATE TABLE [Core].[Address2](
 [Geo_Id] [geography] NULL);

I get

Column, parameter, or variable #2: Cannot find data type geography.

Am I doing something wrong or do I need to enable the new data types somehow?

Thanks

A: 

I have found that when you add a geography column you need to restart the Management Studio in order for it to appear in intellisense. This might be the issue you are having perhaps?

Mike
No its not appearing at all to add it. It's like it doesn't exist full stop
w69rdy
A: 

At the risk of stating the obvious, I'd double check to make sure the database you're using is indeed on a SQL 2008 instance.

Joe Stefanelli
No you're right. I'm at a new company and because I'm using SQL Server 2008 R2 Management Studio to manage the database I assumed all the databases would be stored in 2008 too. Stupid me. Turns out they're all 2005, should've double checked there first. Thanks for you answers
w69rdy