title: splitting values and compare with tables using SQL Server Join
body: <p>I have two tables called <code>Components</code> and <code>PDF_MSDS</code>. The <code>Component</code> table contains columns <code>f_chem_name</code>, <code>f_component_id</code> and <code>f_chem_name</code> and it contains below sample data.</p>
  
  <p><strong>Components</strong> table</p>
  
  <pre><code>SELECT F_Cas_Number, F_Component_Id, F_Chem_Name 
  FROM Components  
  WHERE F_Chem_Name = 'CHMNM_17816'
  </code></pre>
  
  <p>OUTPUT</p>
  
  <pre><code>F_Cas_Number    F_Component_Id  F_Chem_Name
  -------------------------------------------        
  CAS_5861         PRD1000826      CHMNM_17816
  </code></pre>
  
  <p>Sample data of <code>PDF_MSDS</code> table</p>
  
  <pre><code>F_PRODUCT    F_CAS_NUMBERS                         F_COMPONENT_IDS
  ----------------------------------------------------------------------
  360          CAS_5779¿CAS_5861¿CAS_2614¿           3E000685¿3E002268¿3E004960¿3E005217¿PRD1000826¿
  </code></pre>
  
  <p>Now I want display the <code>f_product</code> value from the <code>PDF_MSDS</code> table by comparing  <code>F_Cas_Number</code> and <code>F_Component_Id</code> in <code>Components</code> table with <code>F_CAS_NUMBERS</code> and <code>F_COMPONENT_IDS</code> in the <code>PDF_MSDS</code> table for the given <code>f_chem_name</code> in <code>Components</code> table.</p>
  
  <p>But I am not able compare directly using join with <code>F_Cas_Number</code> in <code>Components</code> table with <code>F_CAS_NUMBERS</code> in <code>PDF_MSDS</code> table and also <code>F_Component_Id</code> in <code>Components</code> table with <code>F_COMPONENT_IDS</code> in <code>PDF_MSDS</code> because multiple <code>cas_numbers</code> and <code>component_ids</code> are stored in <code>F_CAS_NUMBERS</code> and <code>F_COMPONENT_IDS</code> columns in <code>PDF_MSDS</code> table. </p>
  
  <p>How can I search and compare cas_numbers and component_ids and select particular record.Please help.F_Chem_Name is input parameter for Procedure.</p>