先从历史表中查询最新的一个语句: select t.id from ( select r.*, row_number() over(partition by r.分组字段 order by r.排序时间 desc) rw from 表A r ' ) t 下面是完整语句:需要插入的表中字段要和下面查询语句字段对应上 insert into uav_flight_real_location (ID,LOCATION_TIME,GPS_LONGITUDE) select sys_guid() as i…
Sub AutoInputValNewExcel() Dim sh1, sh2 As Worksheet Dim ws1, ws2 As Workbook ) ) ).Sheets() iRows = sh1.UsedRange.Rows.Count If i > ws2.Sheets.Count Then ws1.Sheets().Copy After:=ws2.Sheets(ws2.Sheets.Count) End If Set sh2 = ws2.Sheets(i) sh2.Name =…