Hili, August 23, 2021 - 5:34 am UTC
Hi, thank you very much, that works!
I have another 2 questions for you for this procedure:
1. I tried also to get the info if the column is nullable or not and save it to results table.. How I can add it in the procedure itself?
2. I want to exclude any column that contains more than 20% rows of not null but not including '%@%' too. (meaning this column has few rows that including '%@% but it's not an email column)
Thanks in advanced.
August 26, 2021 - 1:52 am UTC
1) In
select '"' || column_name || '"' column_name
add the NULLABLE so you can reference it later in the insert
2) You'll need to have counts rather than simple existence, so
case when col like ... then 1 else 0 end
becomes
count(case when col like ... then 1 else 0 end)
the main query also would have a count(*) so that you can then compare your count versys total rows in the table
Hili, August 26, 2021 - 1:04 am UTC
Hi it's very important part of my script please see if you can solve it :
2. I want to exclude any column that contains more than 20% rows of not null but not including '%@%' too. (meaning this column has few rows that including '%@% but it's not an email column)
Hili, August 26, 2021 - 2:40 am UTC
Hi, thank you for the answers.
I'm not so familiar with write procedures.
Would you be able to show me how to put this peace of code in the procedure itself? (I talk about #2)
A reader, August 29, 2021 - 2:58 pm UTC
Hi any update?