title: SubQuery returning Multiple rows
body: <p>I have got Two Tables </p>
  
  <p>Product (Id, Name, CCode)   </p>
  
  <p>Category (CCode, CatName)     - No Primary Key</p>
  
  <blockquote>
    <p>Insert Into ProductNew (DW_Prod_Id, ProdId, ProdName, CC, CName)</p>
    
    <p>Select Dw_Prod_Id.Nextval, Id, Name, CCode, </p>
  
  <pre><code>    (Select CatName
       From Category cc, Product p
       Where  cc.CCode IN p.CatCode
       Group By CatName ) 
  </code></pre>
    
    <p>From  Product;</p>
  </blockquote>
  
  <p><em>SQL Error: ORA-01427: single-row subquery returns more than one row
  01427. 00000 -  "single-row subquery returns more than one row"</em></p>
  
  <p>I am getting the above error Because my SubQuery returns more than one row.
  I would like to Match the CatCode of each row from Product table to the Category Table so that I can obtain the CatName and then Insert rows into my New Table :) </p>