title: How do you assign a sequence value to a variable?
body: <p>I need to assign a sequence value to a variable for use later after the sequence value has been incremented.  I've tried this but it gives an error:</p>
  
  <pre><code>variable imageID number;
  select SEQ_IMAGE_ID.CURRVAL into :imageID from dual;
  
  select * from IMAGES where IMAGE_ID = :imageID;
  
  
  Error starting at line 2 in command:
  select SEQ_IMAGE_ID.CURRVAL into :imageID from dual
  Error report:
  SQL Error: ORA-01006: bind variable does not exist
  01006. 00000 -  "bind variable does not exist"
  </code></pre>
  
  <p>I have triple checked that the sequence name is correct, any ideas?</p>