Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> why this code does not work in sqlplus?

why this code does not work in sqlplus?

From: Guang Mei <zlmei_at_hotmail.com>
Date: Mon, 22 May 2000 14:34:03 GMT
Message-Id: <10505.106226@fatcity.com>


Hi:

I am trying to create some oracle sequence based on the current max ID value. Does any one know why it does not work in sqlplus? I got the following error:

MAX(PROMOTIONID)


           69819
       START WITH :maxpromotionid +1
                  *

ERROR at line 3:
ORA-01722: invalid number

Here is the script:



variable maxpromotionid NUMBER;

select max(promotionID)
into :maxpromotionid
from hpxpromotion;

CREATE SEQUENCE HPXSEQ_Promotion

       INCREMENT BY 1
       START WITH :maxpromotionid +1
       MAXVALUE   999999999
       MINVALUE   1
       NOCYCLE
       NOCACHE;

----------------------

If you reply, please send me a copy to zlmei_at_hotmail.com

Thanks.

Guang



Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com Received on Mon May 22 2000 - 09:34:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US