title: Passing part of table name to query
body: <p>I have a database that keeps a table logs - each log id will be numeric
  There are matching tables to join on that are NAMED log + the numeric logId</p>
  
  <p>I need to be able to join these tables based on a log id that will be passed</p>
  
  <p>ex:
  SELECT * from ACTIVITIES a
  INNER JOIN (LOG + LogID) l2 ON a.activityID = l2.activityID</p>
  
  <p>The 'logID' will be passed as a paramater
  SO if logID is 100 I am looking for table log100</p>
  
  <p>How can I do this?</p>