title: Sequence within SQL Select
body: <p>I'm having a bit of a problem with using my sequence within a <code>SELECT</code> statement. </p>
  
  <pre><code>SELECT
       c.cust_name,
       c.site,
       customer_id_seq.nextval    
  FROM
       customer c
  WHERE
       c.customer_id IS NULL
  ORDER BY
       c.site_code ASC
  ;
  </code></pre>
  
  <p>Is giving me an error: </p>
  
  <blockquote>
    <ol start="2287">
    <li>00000 -  "sequence number not allowed here"
    *Cause:    The specified sequence number (CURRVAL or NEXTVAL) is
    inappropriate
           here in the statement.
    *Action:   Remove the sequence number.</li>
    </ol>
  </blockquote>
  
  <p>It's probably something obvious I'm doing wrong so hopefully this will be an easy answer. </p>