Skip to main content

Posts

Showing posts with the label ORACLE

不專業。Delphi5 x Oracle Stored Procedure

這次遇到Delphi要使用Oracle Stored Procedure的案例 需要Procedure輸出多個參數 上網GOOGLE各方及參考後,稍微記錄一下用法 先附上參考連結跟參考內容,如有侵犯到智財或版權的地方或問題,請告知,會立刻拿掉參考內容哦 最後則是實際撰寫的範例 這邊用的方法是透過TStoredProc元件

ORACLE SQL自訂排序(order by decode)

SELECT ID,description FROM A ORDER BY ID 11     台中市 13     彰化縣 14     南投縣 21     台北市 22     新北市 23     基隆市 24     桃園縣 25     新竹縣 26     新竹市 27     苗栗縣 SELECT ID,description FROM A ORDER BY  decode (ID, '21',  1 , '22',  2 , '23',  3 , '24',  4 ), ID 21     台北市 22     新北市 23     基隆市 24     桃園縣 11     台中市 13     彰化縣 25     新竹縣 26     新竹市 27     苗栗縣 註解: T ranslate ID  '21' into the value 1, ID '22'  into the value 2