I am an Oracle DBA and need help with searching using Notepad++. Here is the requirement. I have a huge DDL script generated through Erwin. I want to find out if any constraint name is longer than 30 characters. The problem is that sometimes Erwin appends schema name and table name to the constraint name. I have to ignore these when searching for constraint names longer than 30 characters.
ALTER TABLE ABC_REPORTING.T_ABCDE_INSPTN_INVESN_SUM_HIST ADD CONSTRAINT PK_T_ABCDE_INSPTN_INVSN_SUM_HIST PRIMARY KEY (COL_INSPTN, COL_SEQ_HIST);
I have to search all strings where constraint name
PK_T_ABCDE_INSPTN_INVSN_SUM_HIST is longer than 30 characters.
If the constraint is named as
ABC.DEF.PK_T_ABCDE_INSPTN_INVSN_SUM_HIST, then I have to ignore
If the constraint name is
ABC.PK_T_ABCDE_INSPTN_INVSN_SUM_HIST, then I have to ignore
The constraint name always comes after
ADD CONSTRAINT so this is the only name I have to check.
Any help will be appreciated.