Skip to content
Advertisement

Create dynamic list of tables based on list with wildcards

So I have a list of tables that I want (with wildcards)

That gives me

Now what I need is a list of all tables mentioned in the table config.datalist

So I want a list of:

id 1) all tables in database TEST of which the schemaname starts with audit

id 7) all tables in database TEST in the schema conversie with the name BR

id 8) all tables in database TEST in schema ‘datalibrary’ of which the name starts with a T

id 9) all tables in database BIML in all schema’s

I have the following code but I this works only for the database BIML. How to get this code to work for all databases mentioned in config.datalist.dbname?

That gives me

Advertisement

Answer

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement