如何在SQL Server 2014中將整數列轉換爲varchar?
我抄從SQL Server,除了這是後來添加的最後一列(expected_rn_af
)的結果。
如何使用SQL Server中的update語句將列rn_af
轉換爲expected_rn_af
?
如何在SQL Server 2014中將整數列轉換爲varchar?
我抄從SQL Server,除了這是後來添加的最後一列(expected_rn_af
)的結果。
如何使用SQL Server中的update語句將列rn_af
轉換爲expected_rn_af
?
看起來你想要一個case語句中的64 + rn_af ...
...
case
when rn_af = 1 then 'A'
when rn_af = 2 then 'B'
...
end as expected_rn_af
是從1到9的唯一支持的值?你有查找表,將rn_af轉換爲Expected_Rn_af?你是否有更新聲明,即使它不起作用? –
是否想要在SQL Server中使用新值創建新列,或者是否想要使用更新的值替換當前值?另外,數據的當前結構是什麼? – DForck42
除了下面的其他答案,你有這樣的選項:'substring('ABCDEFGHI',rn_af,1)' – shawnt00