I am trying to alter a sequence with the result of two subqueries. I am new with Oracle and stuck with a syntax. If you can, please help me with this :
alter sequence COM_UPDN_BASE_FRMT_DTL_SEQ increment by ( (select max(id) from COM_UPDN_BASE_FRMT_DTL) - (select last_number from all_sequences where sequence_name = 'COM_UPDN_BASE_FRMT_DTL_SEQ') ) ;
Upon Executing this, I am getting an "invalid number" error. What am I missing here?
You'll definitely want PL/SQL and dynamic SQL, but don't use LAST_NUMBER.
Try something like this instead: