sub get_record()
on error resume next
for i = [a65536].end(xlup).row to 1 step -1
'msgbox i
doevents
for y = 1 to 255
'msgbox y
n = 0
do while true
s_string = 0
s_string = worksheetfunction.find("、", cells(i, y), 1)
'msgbox s_string
'msgbox len(cells(i, y))
if s_string = 0 then goto g_next1
rows(i + n + 1).insert
n = n + 1
if s_string = 1 then
cells(i + n, y).value = "--- "
else
call copy_record(i, n)
cells(i + n, y).value = left(cells(i, y), worksheetfunction.find("、", cells(i, y), 1) - 1)
cells(i, y).value = right(cells(i, y), len(cells(i, y)) - worksheetfunction.find("、", cells(i, y), 1))
end if
'if y > 1 then if len(cells(i + n, 1).value) < 1 then cells(i + n, 1).value = cells(i + n - 1, 1).value
loop
g_next1: next
next
end sub
sub copy_record(i, n)
for k = 1 to 255
cells(i + n, k).value = cells(i, k).value
next
end sub
上一條記錄下一條記錄
select top 1 from 表 where id 當前id order by id desc select top 1 from 表 where id 當前id order by id desc 上一條記錄 select top 1 blogid from gcc bloginfo wher...
Oracle獲取上一條記錄或上一條記錄函式
獲取上一條記錄,若沒有記錄則值為0,其中 lag news id,1,0 news id為根據哪乙個字段進行檢查,1 為每次偏移量,0 為沒有上一條時的返回值 select n.lag news id,1,0 over order by news id asc nid from news n 執行結...
更新最後一條記錄
修改最後一條記錄 update userinfo set userid 55 where 1 order by userid desc limit 1 刪除第一條記錄 delete from userinfo where 1 order by userid limit 1 mysql 總結 在寫這段...