组以逗号分隔的子串及跨平update join

下列语句可以对组以逗号分隔的子串

                set @device_cd_array += ', '
                set @device_cd_array += @nodeid 
                
        set @device_cd_array = stuff(@device_cd_array, 1,1, '')

update时要join表要先set再from 

                update   md
                set LocateNeStatus = @flag
                from m_device as md
                join m_object as mo
                on md.object_id = mo.object_id
                where mo.station_id = @object_id

 

posted on 2013-10-01 17:30  Orz..  阅读(236)  评论(0编辑  收藏  举报

导航