--This file is an illustration of the steps needed to create the HTMID, cx, cy and cz.
਍ⴀⴀ䤀吀 椀猀 甀猀攀搀 昀漀爀 椀氀氀甀猀琀爀愀琀椀漀渀 漀渀氀礀 愀渀 礀漀甀 猀栀漀甀氀搀 挀栀愀渀最攀 琀栀攀 瘀愀爀椀愀戀氀攀 愀瀀瀀爀漀瀀爀椀愀琀攀氀礀ഀഀ

਍ⴀⴀ 䌀爀攀愀琀攀 琀栀攀 栀琀洀椀搀ഀഀ
UPDATE [Galex].[dbo].[test_load_htm]
਍   匀䔀吀 嬀䠀琀洀䤀䐀崀 㴀 嬀䜀愀氀攀砀崀⸀嬀搀戀漀崀⸀嬀昀䠀琀洀䰀愀琀䰀漀渀崀 ⠀搀攀挀开挀攀渀琀Ⰰ 爀愀开挀攀渀琀⤀ഀഀ

਍ⴀⴀ 挀爀攀愀琀攀 愀渀搀 椀渀猀攀爀琀 挀砀Ⰰ 挀礀Ⰰ 挀稀ഀഀ
UPDATE [Galex].[dbo].[FrameWCS] 
਍匀䔀吀 挀砀 㴀 ⠀猀攀氀攀挀琀 砀 䘀刀伀䴀 嬀䜀愀氀攀砀崀⸀嬀搀戀漀崀⸀嬀昀䠀琀洀䰀愀琀䰀漀渀吀漀堀礀稀崀 ⠀搀攀挀开挀攀渀琀Ⰰ 爀愀开挀攀渀琀⤀⤀Ⰰഀഀ
    cy = (select y FROM [Galex].[dbo].[fHtmLatLonToXyz] (dec_cent, ra_cent)),
਍    挀稀 㴀 ⠀猀攀氀攀挀琀 稀 䘀刀伀䴀 嬀䜀愀氀攀砀崀⸀嬀搀戀漀崀⸀嬀昀䠀琀洀䰀愀琀䰀漀渀吀漀堀礀稀崀 ⠀搀攀挀开挀攀渀琀Ⰰ 爀愀开挀攀渀琀⤀⤀ഀഀ

਍ഀഀ
-- Create primary key
਍䄀䰀吀䔀刀 吀䄀䈀䰀䔀 搀戀漀⸀䘀爀愀洀攀圀䌀匀开琀攀猀琀 䄀䐀䐀  䌀伀一匀吀刀䄀䤀一吀 嬀瀀欀开䘀爀愀洀攀开昀椀攀氀搀䤀䐀开稀漀漀洀崀 倀刀䤀䴀䄀刀夀 䬀䔀夀 䌀䰀唀匀吀䔀刀䔀䐀 ഀഀ
(
਍ऀ嬀昀椀攀氀搀䤀䐀崀 䄀匀䌀Ⰰഀഀ
	[zoom] ASC
਍⤀圀䤀吀䠀 ⠀匀伀刀吀开䤀一开吀䔀䴀倀䐀䈀 㴀 伀䘀䘀Ⰰ 䤀䜀一伀刀䔀开䐀唀倀开䬀䔀夀 㴀 伀䘀䘀Ⰰ 伀一䰀䤀一䔀 㴀 伀䘀䘀⤀ 伀一 嬀倀刀䤀䴀䄀刀夀崀ഀഀ

਍ഀഀ
-- Create indices
਍䌀刀䔀䄀吀䔀 一伀一䌀䰀唀匀吀䔀刀䔀䐀 䤀一䐀䔀堀 嬀椀开䘀爀愀洀攀开稀漀漀洀崀 伀一 嬀搀戀漀崀⸀嬀䘀爀愀洀攀圀䌀匀崀 ഀഀ
(
਍ऀ嬀昀椀攀氀搀椀搀崀 䄀匀䌀Ⰰഀഀ
	[zoom] ASC
਍⤀圀䤀吀䠀 ⠀匀伀刀吀开䤀一开吀䔀䴀倀䐀䈀 㴀 伀䘀䘀Ⰰ 䐀刀伀倀开䔀堀䤀匀吀䤀一䜀 㴀 伀䘀䘀Ⰰ 䤀䜀一伀刀䔀开䐀唀倀开䬀䔀夀 㴀 伀䘀䘀Ⰰ 伀一䰀䤀一䔀 㴀 伀䘀䘀⤀ 伀一 嬀倀刀䤀䴀䄀刀夀崀ഀഀ

਍⼀⨀⨀⨀⨀⨀⨀ 伀戀樀攀挀琀㨀  䤀渀搀攀砀 嬀椀开栀琀洀椀搀崀    匀挀爀椀瀀琀 䐀愀琀攀㨀 　㠀⼀　㔀⼀㈀　　㘀 ㈀㌀㨀㈀㠀㨀㔀㈀ ⨀⨀⨀⨀⨀⨀⼀ഀഀ
CREATE NONCLUSTERED INDEX [i_htmid] ON [dbo].[FrameWCS] 
਍⠀ഀഀ
	[htmid] ASC,
਍ऀ嬀挀砀崀 䄀匀䌀Ⰰഀഀ
	[cy] ASC,
਍ऀ嬀挀稀崀 䄀匀䌀ഀഀ
) ON [PRIMARY]