To insert data in bulk:
declare @i intset @i = 12 while @i < 14begin insert INTO&NBSP;[MDM1220]. [dbo]. [device] ([serial_number] ,[IMEI] ,[wifi_mac_addr] ,[bluetooth_mac_ addr] ,[activesync_id] ,[STRONG_ID] ,[last_inventory_time] ,[ First_connection_date] ,[last_auth_date] ,[last_username] & nbsp; ,[last_profile_invent_time] ,[os_family] ,[last_ user_id] ,[whitelist_compliant] ,[BLACKLIST_COMPLIANT] ,[DEVICE_PROPERTIES_TIMESTAMP] ,[ALL_WHITELIST_COMPLIANT] ,[LAST_ACTIVITY] ,[MANAGED] ,[COOKIE_TOKEN] ,[cookie_exp] , [shared_status] &Nbsp; ,[profile_status]) VALUES (@i , ' 35 698206 450366 6 ' , ' 64:9a:be:85:7e:81 ' , ' 64:9a:be:85:75:67 ' , ' 2tq3f2q4vt69v447kfop7reqq4 ' , ' CF8Q44AA ' , ' 2015-12-31 01:03:07.993 ' , ' 2015-12-30 23:08:30.497 ' , ' 2015-12-31 01:03:08.323 ' , ' [Email protected]&nbSP; " Huifu2 wen "' , ' 2015-12-31 01:03:08.243 ' , ' ANDROID ' ,11 ,1 ,1 , ' 2015-12-30 23:09:38.317 ' ,1 , ' 2015-12-31 01:03:08.323 ' ,1 ,NULL ,NULL ,0 ,0 ) set @i = @i + 1end
Update data
DECLARE @i intset @i = 1 while @i < 14begin UPDATE [mdm1220]. [dbo]. [DEVICE] Set activesync_id = ' Activesyncchangedfop7reqq4 ' WHERE activesync_id = ' 2tq3f2q4vt69v447kfop7reqq4 ' Set @i = @i + 1en D
SQL BULK INSERT and change data