jasonhuibers
Programmer
How can I query the following examples. I want to SELECT WHERE in the case there is a duplicate acct id - return the record with a value in Expire_DT.
Also take into consideration, if there is a duplicate acct id as in example 2 with no Expire_DT use a DISTINCT to return only one record..
Example 1
Acct_ID LName FName Expire_DT
12345 Smith John 01-May-2012
12345 Smith John
Example 2
Acct_ID LName FName Expire_DT
22222 Brown Larry
22222 Brown Larry
Also take into consideration, if there is a duplicate acct id as in example 2 with no Expire_DT use a DISTINCT to return only one record..
Example 1
Acct_ID LName FName Expire_DT
12345 Smith John 01-May-2012
12345 Smith John
Example 2
Acct_ID LName FName Expire_DT
22222 Brown Larry
22222 Brown Larry