mysql - Process entier DB to fetch data -


look @ query below. db: oracle

select table_name, column_name, data_type all_tab_cols  data_type = 'date' , owner = 'owner_name' 

o/p:

table_name column_name data_type t1         c1          date t1         c2          date t2         c3          date t2         c4          date 

now, got result perfectly. want build query processes further. result about, want pickup table_name, column_name , apply filter on column_name.

example:

table: t1 c1            c2 01-01-2001    01-01-2011 02-02-1990    05-05-1700 03-03-1753    10-10-1764 

like wise table... speaking, want columns db year of date field less particular year. i've tried couldn't able it.

i've got it..

this query it..

select table_name       , column_name       ,to_number(extractvalue(        xmltype(dbms_xmlgen.getxml(        'select count(*) c '||owner||'.'||table_name ||' extract(year ' || column_name || ') < 1753'        ))        ,'/rowset/row/c')) count1  all_tab_cols data_type = 'date' , owner = 'owner_name' 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -