Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_tables_with_column not working? #128

Closed
kadrlica opened this issue Jun 2, 2017 · 1 comment
Closed

find_tables_with_column not working? #128

kadrlica opened this issue Jun 2, 2017 · 1 comment

Comments

@kadrlica
Copy link
Collaborator

kadrlica commented Jun 2, 2017

How is find_tables_with_column supposed to work?

I'm working in desoper and I would like to find tables with the column DESFILE_ID. I know that it exists in PROD.FILE_ARCHIVE_INFO, but find_tables_with_column doesn't find anything:

DESDB ~> find_tables_with_column DESFILE_ID
0 rows in 0.07 seconds
   TABLE_NAME  COLUMN_NAME  
No rows selected

However, the column definitely exists:

DESDB ~> describe_table PROD.FILE_ARCHIVE_INFO;
Description of FILE_ARCHIVE_INFO commented as: 'None'
Estimated number of rows: 396210912
    COLUMN_NAME DATA_TYPE     DATA_FORMAT COMMENTS
1  ARCHIVE_NAME  VARCHAR2   25 characters     None
2   COMPRESSION  VARCHAR2    5 characters     None
3    DESFILE_ID    NUMBER          (15,0)     None
4      FILENAME  VARCHAR2  100 characters     None
5          PATH  VARCHAR2  250 characters     None

I'm using v1.4.2.

@mgckind
Copy link
Owner

mgckind commented Jun 2, 2017

thanks Alex, is a minor overlooked bug from when I changed the CACHE_TABLES, thanks for catching it! the query was missing the owner part

Fixed now, for what is worth this is the query working:
SELECT t.owner || '.' || t.table_name as table_name, t.column_name FROM all_tab_cols t, DES_ADMIN.CACHE_TABLES d WHERE t.column_name LIKE '%s' AND t.owner || '.' || t.table_name = d.table_name

@mgckind mgckind closed this as completed in 9210c85 Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants