<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>SQL</anon>
  </categories>
  <description>サロゲート文字*1を含む文字列だと、LEN 関数正しい文字列長を取得出来ない。 -- このSQLを実行すると、1ではなく2が返される SELECT LEN(N'𠮷'); 注意：環境によっては□が表示されるかもしれないけど、実際はつちよし (吉の上が士じゃなくて土) です。 以下、□が現れたら脳内変換するか、表示できる環境で見るかしてくだしあ。 で、実は問題は LEN 関数だけじゃなくて、他の文字列関数や、文字列型にまで及ぶ。 文字列型 例えば、nchar(1) 型や nvarchar(1) の列には「𠮷」を格納することは出来ないし*2、nchar(1) 型や nvarchar(1) 型の変数に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20090516%2F1242478538&quot; title=&quot;SQL Server の LEN 関数は文字列の長さを正確に取得出来ない・・・だけじゃない - ぐるぐる～&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>2009-05-16 21:55:38</published>
  <title>SQL Server の LEN 関数は文字列の長さを正確に取得出来ない・・・だけじゃない</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20090516/1242478538</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
