Skip to Main Content

GoldenGate

Announcement

Testing banner

GG 21.3 MA - DDLSUBST and regular expressions regex

User_YXNZKDec 29 2022

Hi, is there anyway to use regex-type filtering with DDLSUBST? I have a requirement to substitute strings that can be part of larger strings that I don't have a way to isolate. My substitutions include unwanted instances. For example:
DDLSUBST 'gp' with 'gpabc'
will correctly update "GRANT select on tbl to gp" to "GRANT select on tbl to gpabc"
but it will also change "create view myview as select * from xyzgp" to "create view myview as select * from xyzgpabc" which I don't want it to do.
I have various scenarios like the one above that are unfortunately mutually exclusive when it comes to tactics to isolate the scenario e.g. adding a leading space would work except when 'gp' is at the start of a table name. Add a trailing period would work for "create table gp.tbl as ..." but would not work for "create table "gp"."tbl" as ...." and it's not permitted to use the " in a DDLSUBST so I don't have a tactic for that case.
Is there some technique I can use to isolate my cases, such as a regex-like approach? I don't mind having to use multiple DDLSUBST to accomplish it

Comments
Post Details
Added on Dec 29 2022
1 comment
30 views