Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Issues creating sequences while looping through a database link

I am trying to loop through sequences through a database link which I am doing fine. The issue I am getting is ORA-00933 "SQL command not properly ended". If I remove the min value from execute immediate it works perfectly fine. Whats wrong with my syntax?

This is my code:

Declare 
    CURSOR seqe IS 
        select sequence_name, min_value from dba_sequences@mylink
BEGIN 
    For i in seqe LOOP 
        execute immediate 'create sequence '||i.sequence_name|| ' min_value ' ||i.min_value; 
    END LOOP;
END;

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There’s no underscore in MINVALUE

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading