title: Need help joining two tables by guid then adding values across columns by row
body: <p>I have two tables. </p>
  
  <p>One table stores items and their cost and are stored uniquely with their own guid.</p>
  
  <p><strong>ItemCost Table</strong></p>
  
  <pre><code>Item_ID     ItemCategory   Item    Cost
  
  x-xx-x      Computer       Laptop  400.00
  </code></pre>
  
  <p>The other table stores a work space that is a collection of these items, best illustrated.</p>
  
  <p><strong>Work Space Table</strong></p>
  
  <pre><code>WorkSpace_ID    Workspace_Name   Item_Category_1     Item_Category_2 and so on....
  
  xx-xx-xx         Workspace A     xx-xx-xx          (the guid from the first table) 
  </code></pre>
  
  <p>Now I need some way to join the cost from the ItemCost table to the guid's they represent in the Work Space table, then, add them up across the columns to give a total cost of the work space. Some Item_Category columns in the Work Space table will be null. </p>
  
  <p>Fairly new at SQL, kind of learning by fire here. If there's a better way to structure this, I'm open for suggestion. </p>
  
  <p>Thanks.</p>