组以逗号分隔的子串及跨平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   Orz..  阅读(237)  评论(0编辑  收藏  举报

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示