Reputation: 43
I am getting an anoying error on this simple sql and I can't spot the error, any help will be appretiated.
CREATE TABLE alertitem
([id] INT,
[dateposted] DATETIME,
[daterevised] DATETIME,
[datestart] DATETIME,
[dateexpires] DATETIME,
[userid] INT,
[title] VARCHAR(MAX),
[details] VARCHAR(MAX),
[lat] DOUBLE,
[lon] DOUBLE,
[radius] INT,
[imageid] INT);
Upvotes: 2
Views: 4348
Reputation: 518
Double isn't a SQL Server datatype.
This should be a complete list of all the data types, see MSDN.
I should note, you'll probably want to use FLOAT or DECIMAL to solve your problem, but I don't know anything about the rest of what you're doing (producers or consumers), so I'll let you pick which data type will solve your problem.
Upvotes: 8
Reputation: 812
You simply needed to remove DOUBLE, as it's not a supported data type. I'd also reccomend organizing your query in a more easy to read manner such as:
CREATE TABLE alertitem (
[id] INT,
[dateposted] DATETIME,
[daterevised] DATETIME,
[datestart] DATETIME,
[dateexpires] DATETIME,
[userid] INT,
[title] VARCHAR(MAX),
[details] VARCHAR(MAX),
[lat] FLOAT,
[lon] FLOAT,
[radius] INT,
[imageid] INT);
You'll find it easier to troubleshoot bugs this way.
Upvotes: 1