top of page

Create Sequence in IFS

Writer's picture: Rumesh Aponso (RMAX)Rumesh Aponso (RMAX)
DECLARE
   seq_exists_   NUMBER;
   sql_stmt_     VARCHAR2(2000);
   
   CURSOR check_exists IS
      SELECT 1
      FROM   all_objects
      WHERE  object_name = 'METADATA_ID_SEQ'
      AND    object_type = 'SEQUENCE';
BEGIN
   OPEN  check_exists;
   FETCH check_exists INTO seq_exists_;
   IF (check_exists%NOTFOUND) THEN
      seq_exists_ := 0;
   END IF;
   CLOSE check_exists;
   
   IF (seq_exists_ = 0) THEN
      Database_SYS.Create_Sequence('METADATA_ID_SEQ', 'MINVALUE 1 START WITH 1 INCREMENT BY 1');
   END IF;
END;
/

5 views0 comments

Related Posts

See All

Fnd Dynamic Tab Page in IEE Client

[FndWindowRegistration("YVVDA_COMPANY_ADDR", "YvvdaCompanyAddr", FndWindowRegistrationFlags.HomePage)] [FndDynamicTabPage("frmCompanyAddr...

LISTAGG in PLSQL

Example 1: SELECT DISTINCT LISTAGG(t.commission_receiver, ';') WITHIN GROUP (ORDER BY t.commission_receiver) FROM...

Get Foundation Error from ORA Error

FUNCTION Strip_Ora_Error ( sqlerrm_        IN VARCHAR2,    sqlcode_        IN NUMBER DEFAULT NULL,    strip_ora_only_ IN BOOLEAN DEFAULT...

Comments


Copyright © 2025 RMAXOneNote

  • Online CV
  • LinkedIn
  • Youtube
  • GitHub
  • Blogger
bottom of page