PL/SQL (MOSC)

MOSC Banner

Output all columns where distinct values are either all blank or 9s

edited Jun 25, 2011 7:21AM in PL/SQL (MOSC) 10 commentsAnswered
Hello,
I've been tasked with outputting all columns (user production tables) where the values are either all blank or a string of 9s.  Every column on our database has a fixed length data type of char.

I know I can start by generating a list of applicable columns from the all_tab_columns view.  Once I have this list, I then can somehow scan each column name returned to determine which ones have values that are either blank or all 9s.  I guess my question is what's the simplest way to do this?  Is there a function I can run on a column that will scan through each position for a specific value?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center