0

我正在考虑使用新的几何数据类型来表示数据库中的向量的想法。多点几何数据类型可以很好地解决这个问题,但我的问题是,有没有办法用多点中的 x、y 值填充两列表,其中每个点是表中的一行,而 X 和Y 点值分别在 column1 和 column2 中?

4

2 回答 2

0

我假设您已阅读几何数据类型入门。

http://msdn.microsoft.com/en-us/library/bb895270.aspx

除此之外,我无能为力。

于 2009-05-05T18:41:17.340 回答
0

弄清楚了:

select
mp.id
,mp.vector.STPointN(nums.number).STX
,mp.vector.STPointN(nums.number).STY
,nums.number
from tblWithMultiPoints mp --table with an int id, and a multipoint called vector
,#NUMBERS nums --temp table with 1 - max num of points in any multipoint
where nums.number <= mp.vector.STNumPoints()
于 2009-05-07T01:45:03.053 回答