title: Selecting from multiple tables in VBScript/ASP
body: <p>I understand that this question is based on a very old programming language, and is also based on some poor practices with database design, but I am hoping for some guidance as my VBScript is not up to scratch, and at my job I am unable to change my database structure or my scripting language.</p>
  
  <p>I am working on a webpage that gets its data from a database which originally contained all of its data in one table. However, the database managers at my work have decided to split the large table into many smaller ones. Our webpage contains an online map with point data, which displays in a new page a table of data for each point found. The code to connect to the database originally looked something like this:</p>
  
  <pre><code>sql_select = "SELECT * FROM table_name WHERE master_id='"&amp;key&amp;"'"
  Set rs = Conn.Execute(sql_select)
  </code></pre>
  
  <p>This code worked fine for what it was used for. However, now that the main table has been divided into seven sub-tables, I am in need of a code that will select all data from all tables, and then filter them based on their master id.</p>
  
  <p>I feel like I understand the theory of how to make this work (I am not a computer science major, so this is still somewhat foreign to me), and that I need to implement a union. My main problem is dealing with the syntax of VBScript/ASP in creating this script, as it seems like everything I try doesn't work.</p>
  
  <p>Can anybody please lend me some guidance? Much appreciated!</p>