看板 Database 關於我們 聯絡資訊
假設table某一個欄位資料是 1234 我要把他轉成 ABCD 所以我就寫了一段select case去轉換 select Col.A, (select case when substr(Col.A,1,1)='1' then 'A' when substr(Col.A,1,1)='2' then 'B' when substr(Col.A,1,1)='3' then 'C' when substr(Col.A,1,1)='4' then 'D' end) from TABLExxx where PrimaryKey='XXXX' 那我要怎麼把全部的資料Col.A都套用這個去做轉換? update TABLExxx set ( ???? ) where Primary.Key in( 'XXXX1', 'XXXX2', .... ) ( ???? ) 這裡該怎麼寫? 請教一下各位高手 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.124.185.115
roywu607:oracle 寫 cursor 不是很快嗎? 04/22 16:35