sort by which column?
idiotricky 發表於 2015-12-4 22:22



    u can see the action, sort by number

TOP

得, 但係好慢
snoopy11hk 發表於 2015-12-4 22:03

慢唔慢係睇有幾多data...  index落得好唔好.. 返正佢都係要3條record.. 我又唔覺得好慢.

TOP

慢唔慢係睇有幾多data...  index落得好唔好.. 返正佢都係要3條record.. 我又唔覺得好慢. ...
7h1r733n 發表於 2015-12-5 00:16


1. 慢 , 用 SP 寫要 有 SQL 同 PL 的 context switch
2. 煩, SQL 短過 PL 好多 (唔洗 loop, 唔洗 bulk fetch)
一句
OPEN CURSOR FOR
SELECT
就完

TOP

回覆 10# idiotricky

sort by date

TOP

研究左兩日還未研究到  

TOP

你係咪想
#1 select by date range
#2 then select lastest date entry for each ID+Number group?
試下用group by / union / minus / sub table 個方法念
唔好用每行每行咁念

TOP

select row_number() over blahblah as rowno,    *  from x into temptableX
select row_number() over blahblah -1 as rowno,    *  from x into temptableY
select temptablex x where exists(select 1 from temptableY where Y.rowno = X.rowno and y.[Number] <>X.[Number])

TOP

即係點...有冇人翻譯?
就咁搵 不同number?
select distinct

TOP

本帖最後由 奇雲 於 2015-12-7 17:21 編輯

5 樓已經比晒參考. (1+2 sample).

TOP

慢唔慢係睇有幾多data...  index落得好唔好.. 返正佢都係要3條record.. 我又唔覺得好慢. ...
7h1r733n 發表於 2015-12-5 00:16



  如果oracle 咁都叫慢, 其他可以唔洗用.

TOP