<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>babydaemons</author_name>
  <author_url>https://blog.hatena.ne.jp/babydaemons/</author_url>
  <blog_title>babydaemons’ blog</blog_title>
  <blog_url>https://babydaemons.hatenablog.com/</blog_url>
  <categories>
    <anon>SQLServer</anon>
  </categories>
  <description>恥ずかしながら、再帰CTEを知らずに、 Doukaku.org - 知った元ネタ：16 進数から 10 進数への変換 - ぐるぐる～ をセンス無いと酷評して、渦巻きな人とちょっと喧嘩気味になっちゃいましたが、再利用性を考慮して個人的にはユーザ定義関数で実装しておきます。 ユーザー定義関数の実装は 無難にこんな感じですかね。SUBSTRING関数よりもCASE式の方がCPU負荷が軽そうですが、煩雑なのでズボラしました。 CREATE FUNCTION [dbo].[STRTONUM](@number_string varchar(64), @radix int) RETURNS int AS B…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbabydaemons.hatenablog.com%2Fentry%2F20110523%2FConvert_Function_HexString_To_Number_In_SQLServer&quot; title=&quot;任意の基数の文字列を整数値に変換するユーザー定義関数 - babydaemons’ blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-23 00:00:00</published>
  <title>任意の基数の文字列を整数値に変換するユーザー定義関数</title>
  <type>rich</type>
  <url>https://babydaemons.hatenablog.com/entry/20110523/Convert_Function_HexString_To_Number_In_SQLServer</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
