IDEMPIERE-3815 03_update_sequences.sql doesn't work when no sequence in oracle

This commit is contained in:
Carlos Ruiz 2018-11-09 21:28:12 -02:00
parent 9c5a53db6f
commit dd530a71f4
1 changed files with 6 additions and 1 deletions

View File

@ -105,7 +105,12 @@ BEGIN
|| 'WHERE Name = '''
|| r.tablename
|| ''' AND istableid = ''Y''';
BEGIN
EXECUTE IMMEDIATE cmdseq INTO currentseq, currentseqsys;
EXCEPTION
WHEN NO_DATA_FOUND THEN
DBMS_OUTPUT.PUT_LINE ('Sequence does not exist for table '|| r.tablename);
END;
END IF;
IF currentnextsys <> currentseqsys OR (currentnext <> currentseq AND Isnativeseqon ='N')