title: SQL: create a recordset by repeating the output of one query for every record of a second query
body: <p>I have a query that returns records as below </p>
  
  <p><strong>vw_EmployeeReferenceNumbers</strong></p>
  
  <pre><code>NAME       Number
  ----       ------
  AA         123
  AA         234
  AA         456
  </code></pre>
  
  <p>I have another table that returns records like so</p>
  
  <p><strong>AllEmployees</strong></p>
  
  <pre><code>   AllNames
      ----------
      AA
      BB
      CC
  </code></pre>
  
  <p>I want to output a recordset like so</p>
  
  <pre><code>NAME       Number
  ----       ------
  AA         123
  AA         234
  AA         456
  BB         123
  BB         234
  BB         456
  CC         123
  CC         234
  CC         456
  </code></pre>
  
  <p>I dont want to use Cursors at all. I cant modify the view vw_EmployeeReferenceNumbers or the table AllEmployees. Can this be done in SQL?</p>
  
  <p>What I have so far that doesn't work is:</p>
  
  <pre><code>select name, number
  from 
  (select Name, number, 1 as id from vw_EmployeeReferenceNumbers
  ) as A
  left join
  (select name, 1 as id from AllEmployees
  ) as B
  on A.id = B.id
  </code></pre>