<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>accs2014</author_name>
  <author_url>https://blog.hatena.ne.jp/accs2014/</author_url>
  <blog_title>もう一度学ぶMS-Access</blog_title>
  <blog_url>https://www.accessdbstudy.net/</blog_url>
  <categories>
    <anon>Access Tips</anon>
  </categories>
  <description>多数あるレコードのうちランダムに一定数のものを抽出するという抽選を行う場合、ExcelですとRAND関数を使って各レコードに異なるランダムな値を与え、その値の大小で抽選結果を決定するというのが一般的です。 Accessの場合、テーブルではRnd関数を使えませんし、クエリでも関数を「Rnd()」などと記述すると全てのレコードで同じ値になってしまうためうまくいきません。そこで対応例を示します。 例1:クエリのRnd関数で完結させる例 例2:更新クエリまたはテーブル作成クエリによりテーブルにランダムな値を書き込む例 例1:クエリのRnd関数で完結させる例 元のテーブルはそのままに、クエリでのRnd関…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.accessdbstudy.net%2Fentry%2F20081225%2Fp1&quot; title=&quot; クエリでのRnd関数による抽選 - もう一度学ぶMS-Access&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>https://cdn-ak.f.st-hatena.com/images/fotolife/a/accs2014/20150718/20150718190931.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-12-25 00:00:00</published>
  <title> クエリでのRnd関数による抽選</title>
  <type>rich</type>
  <url>https://www.accessdbstudy.net/entry/20081225/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
