title: SQL Column does not include value
body: <p>I'd like to ask you to help me with a problem</p>
  
  <p>I currently have SQL tables <code>PRODUCT</code> and <code>PRODUCT_PARAMETER</code>.</p>
  
  <p><code>PRODUCT</code> has one interesting field: <code>PRODUCT_ID</code> (and bunch of others, not important). </p>
  
  <p><code>PRODUCT_PARAMETER</code> is linked to <code>PRODUCT</code> on <code>PRODUCT_ID</code> and has columns <code>KEY</code> and <code>VALUE</code>.</p>
  
  <p>I need to find out all products that have no <code>PRODUCT_PARAMETER</code> with key "cost" or they have the parameter but the value is <code>NULL</code>. There can be <code>PRODUCT_PARAMETER</code> with different key </p>
  
  <p>Also, due to restrictions of the system I am using it with, I cannot change structure of the DB and must do it within one SQL command,the latter is probably causing me most pain, because I am fairly confident with being able to pull either half of what I need from DB</p>
  
  <pre><code>SELECT PRODUCT_ID FROM PRODUCT MINUS 
  SELECT PRODUCT_ID FROM PRODUCT_PARAMETER WHERE KEY LIKE 'cost';
  </code></pre>
  
  <p>pulling out products that have not the parameter and </p>
  
  <pre><code>SELECT PRODUCT_ID FROM PRODUCT_PARAMETER WHERE KEY LIKE 'cost' AND VALUE IS NULL
  </code></pre>
  
  <p>for pulling out products with NULL values at existing key.</p>
  
  <p>At the top level, I need to put both of these results into single sys_refcursor which is defined by blueprint like this</p>
  
  <pre><code>FUNCTION VALIDATION_FCTN RETURN SYS_REFCURSOR IS
      v_rc sys_refcursor;
  BEGIN
      OPEN v_rc FOR #fillSelectStatementHere;
      RETURN v_rc;
  END;
  </code></pre>
  
  <p>Which I can slightly modify as long as it returns all values in single refcursor, in case merging cursors is better than a <code>SELECT</code> statement. Although I am very fresh to SQL programming and never saw <code>PLSQL</code> before, so I would prefer the <code>SELECT</code> solution, if possible. </p>
  
  <p>Thank you in advance</p>