程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> 用sql server進行10進制和16進制轉換的自定義函數

用sql server進行10進制和16進制轉換的自定義函數

編輯:關於SqlServer
google_ad_clIEnt = "pub-6430022987645146";google_ad_width = 160;google_ad_height = 600;google_ad_format = "160x600_as";google_ad_type = "text_image";google_ad_channel = "";google_color_border = "336699";google_color_bg = "FFFFFF";google_color_link = "0000FF";google_color_text = "000000";google_color_url = "008000";



google_ad_client = "pub-6430022987645146";google_ad_width = 160;google_ad_height = 600;google_ad_format = "160x600_as";google_cpa_choice = "CAEaCAI14zF9eJFNUDRQHVANUAVQLVAHUANQR1ALUC8";google_color_border = "336699";google_color_bg = "FFFFFF";google_color_link = "0000FF";google_color_text = "000000";google_color_url = "008000"; google_ad_clIEnt = "pub-6430022987645146";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text_image";google_ad_channel = "";google_color_border = "336699";google_color_bg = "FFFFFF";google_color_link = "0000FF";google_color_text = "000000";google_color_url = "008000";

create    function hextoint(@h varchar(8))
returns bigint 
begin

declare @r bigint  
set @r=0

declare @i bigint
set @i=1

while @i<=len(@h)
begin
set @r=@r+

convert(int,
(
case 
when substring(@h,@i,1)<=''9'' then substring(@h,@i,1)
when substring(@h,@i,

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved