Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将数值添加到我的视图中 (xmin,ymin,xmax,ymax) 数值。该表具有几何作为 varbinary(max) 值。
我如何从几何字段中获取 bbox 值?
感谢您的任何建议。
据我了解,您可以SUBSTRING()在varbinary列上使用来提取单个绑定值,然后将结果转换为int(如果它们是int)。
SUBSTRING()
varbinary
int
像这样的东西:
SELECT xmin = CAST(SUBSTRING(bbox, xmin_start_pos, xmin_byte_length) AS int) FROM ...