{"id":1771,"date":"2011-06-16T01:42:52","date_gmt":"2011-06-16T01:42:52","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=1771"},"modified":"2011-06-16T01:42:52","modified_gmt":"2011-06-16T01:42:52","slug":"%e8%bf%9b%e5%88%b6%e8%bd%ac%e6%8d%a2","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2011\/06\/16\/%e8%bf%9b%e5%88%b6%e8%bd%ac%e6%8d%a2\/","title":{"rendered":"\u8fdb\u5236\u8f6c\u6362"},"content":{"rendered":"<pre escaped=\"true\" lang=\"tsql\">\r\n\u53ef\u6267\u884c\u4efb\u610f\u8fdb\u5236\u8f6c\u6362\uff0c2\u8fdb\u5236\uff0c8\u8fdb\u5236\uff0c32\u8fdb\u5236\uff0c36\u8fdb\u5236\uff0c\u8fdb\u5236\u6570\u4f9d\u8d56\u4e8e\u6240\u80fd\u8868\u793a\u7684\u5b57\u5178\u6570\uff0c\u5982\u4e0b'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' 36\u4e2a\u5b57\u6bcd\uff0c\u6700\u5927\u662f36\u8fdb\u5236\uff0c\u4e0b\u9762\u5173\u952e\u4e00\u53e5\u662fSET @alldigits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'\uff0c\u7528\u53d6\u5b57\u7b26\u4e32\u4f4d\u7f6e\u7684\u65b9\u5f0f\u5f97\u5230\u7ed3\u679c\u3002\r\nIF OBJECT_ID('dbo.DecToBase') IS NOT NULLDROP FUNCTION dbo.DecToBase;GO\r\nCREATE FUNCTION dbo.DecToBase(@val  BIGINT,@base  INT)RETURNS VARCHAR(63)ASBEGIN\r\n    DECLARE @r AS VARCHAR(63),@alldigits AS VARCHAR(36)\r\n    SET @alldigits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'    SET @r = ''\r\n    WHILE @val &gt; 0    BEGIN\r\n        SET @r = SUBSTRING(@alldigits,@val%@base+1,1) + @r\r\n        SET @val = @val \/ @base    END    RETURN @rENDgo<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53ef\u6267\u884c\u4efb\u610f\u8fdb\u5236\u8f6c\u6362\uff0c2\u8fdb\u5236\uff0c8\u8fdb\u5236\uff0c32\u8fdb\u5236\uff0c36\u8fdb\u5236\uff0c\u8fdb\u5236\u6570\u4f9d\u8d56\u4e8e\u6240\u80fd\u8868\u793a\u7684\u5b57\u5178\u6570\uff0c\u5982\u4e0b&#8217;012345678 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-1771","post","type-post","status-publish","format-standard","hentry","category-sql-server"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/1771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=1771"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/1771\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=1771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=1771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=1771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}