How to write sql query to find invalid SSN using a JOIN!!
I would like to write a query that returns any Employees (id, ssn, and name) with an invalid SSN along with the company name. From the following two tables information.
co (PK, varchar(10), not null)
name (varchar (50), not null)
co (PK, FK, varchar(10), not null)
id (PK, varchar(10), not null)
ssn (varchar(11), not null)
lastName (varchar(40), not null)
firstName (varchar(40), not null)
birthday (datetime, null)
An invalid or impossible SSN is one that we never assigned.
We have never assigned an SSN with the first three digits of:
Additionally, prior to June 25, 2011, we never assigned an SSN with the first three digits of:
Above 772 in the 700 series
We have never assigned an SSN with the second two digits of 00 or the last four digits of 0000.
Using a join on the two tables?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)