SSMSE2k8:寻求无意义的错误消息说明...消息206 [英] SSMSE2k8: Seeking non-sense error message clarification ... Msg 206

查看:109
本文介绍了SSMSE2k8:寻求无意义的错误消息说明...消息206的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在故意滥用地理数据类型期间:

声明@gxxx地理;
SET @gxxx = geometry :: STGeomFromText(''POLYGON((-118.934303 40.883523,-72.279144 42.769298,-73.991066 40.739213,-105.828393 28.568069,-118.934303 40.883523)),, 0);
SELECT @ gxxx.STArea();

我收到此错误:

"Msg 206,第16级,州2,第2行
操作数类型冲突:sys.geography与sys.geometry不兼容"

所以我想知道,甚至在帮助中查找对象:

选择*从sys.geometry

或:

选择*来自sys.geography

应该返回一些东西吗?

没有sys.geography或sys.geometry ...这样的错误消息怎么回事?

(是的,我可以看到我的T-SQL重定向是邪恶的..因此标题内容)

During the purposeful misuse of a geography data type:

DECLARE @gxxx geography;
SET @gxxx = geometry::STGeomFromText(''POLYGON((-118.934303 40.883523, -72.279144 42.769298, -73.991066 40.739213, -105.828393 28.568069, -118.934303 40.883523))'',0);
SELECT @gxxx.STArea();

I get this error:

"Msg 206, Level 16, State 2, Line 2
Operand type clash: sys.geography is incompatible with sys.geometry"

So I was wondering, even looked up the object in help:

SELECT * FROM sys.geometry

Or:

SELECT * FROM sys.geography

Should return something, no?

There''s no such thing as sys.geography or sys.geometry ... so how is this an error message?

(Yes, I CAN see that my T-SQL disdirection is evil .. hence the title content)

推荐答案

除非您已创建表sys.geometry和sys.地理区域中,您将简单地得到一个无效的对象名称sys.geometry",由于表不存在,该名称完全有效.

几何和地理是系统数据类型,因此它们彼此不能互换,因此您当然会遇到Operand类型冲突错误.

我可能在您的问题中遗漏了一些东西,或者一切都应该恢复.
Unless you have created the table sys.geometry and sys.geography you would simply get an "Invalid object name ''sys.geometry'' which is entirely valid as the tables don''t exist.

geometry and geography are System Data Types so they can''t be interchanged with each other so of course you''ll get the Operand type clash error.

Either I''m missing something in your question, or everything is as it should be.


这篇关于SSMSE2k8:寻求无意义的错误消息说明...消息206的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆