开发者

SQL Server 2008 geography - spatial result - color based on another column value

I have a table like this in SQL Server 2008:

serv_type   coords
------------------------
shop        0xE6100000010CE4857478080B49401CD2A8C0C9DE2C40
shop        0xE6100000010C54C6BFCFB80A49408A592F8672DA2C40
restaurant  0xE6100000010C2A00C63368064940B5C189E8D7162D40
shop        0xE6100000010CF9F884ECBC0B49405D6A847EA6FE2C40
restaurant  0xE6100000010CD3BEB9BF7A004940BC202235EDF22C40
restaurant  0xE6100000010CEE76BD3445004940508D976E12F32C40
restaurant  0xE6100000010CFFAECF9CF50B49400ABDFE243EE72C40
...        ...

If I SELECT * FROM this_table, I automatically obtain spatial results -开发者_运维百科 something like points on a map.

What I would like to get is the very same thing, but with the points colored based on the serv_type column, i.e., I want the same "map", but all restaurants should be, say, blue and all shops should be red.

Is it possible to do this in SQL Server? Thanks.


SQL Server is only going to give you the data. If you want to format that data for presentation according to attributes of that data, you're going to have to build a UI which contains your presentation logic.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜