Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Finding two columns in all tables

Author  Topic 

divan
Posting Yak Master

153 Posts

Posted - 2013-10-29 : 11:58:15
I have several tables that have the POLICY_NUMBER and POLICY_DATE_TIME in them.. All the tables with these two columns should have a POLICY_NUMBER and a corresponding POLICY_DATE_TIME.I would like to find all tables that have POLICY_NUMBER = 123456 but do not have the corresponding POLICY_DATE_TIME..

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-29 : 12:07:16
This is just a slight tweak from

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=189186

With 100 + posts you should be in a position to derive it out of previous suggestion rather than waiting for spoonfed answer

Make a try and let us know if you face any issues

By do not have the corresponding POLICY_DATE_TIME I think you mean NULL value for date

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -