Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Display all tables and its column from database if particular column value is NULL

$
0
0

I have a requirement in which I need to display certain columns from table in database, if

1)- One of the column returns the value NULL within last 24 hours of data warehouse load

E:G;

I have table test1, test2,test3 in a database 'dummy'

All the tables in database has common columns i-e 'modified_date','building_id','Create_date'.

If modified_date column from any table returns NULL and it is within 24hours of 'Create_Date', I should display/return rows with

Table Name, building_id , Create_date of that table from a database.

I'm thinking to use INFORMATION_SCHEMA.COLUMNS to get all table info in a database but not sure how to join it with table having modified_date is NULL within 24hours of Create_date.

I would appreciate your help.


ZK


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>