Hi All,
I have a requirement where i need to provide a SQL statement
to front application.
Only those records in a Single ( Login_group ) should return
where all Login_id are expiry on 23-DEC-2010
The Login_id 100,101, 102 should all exclude from the SQL result as 102 is not Expiry on 23-DEC-2009 so all Records with login_group 1 are Excluded.
In Short Only those records should be return where all records in same Login_group are Expired on 23-DEC-2010.
Any hint is Welcome.
Thanks
I have a requirement where i need to provide a SQL statement
to front application.
Code:
The data is like
Login_id Login_group Expiry_date
100 1 23-DEC-2010
101 1 23-DEC-2010
102 1 26-NOV-2010
10001 2 23-DEC-2010
10002 2 23-DEC-2010
10003 3 23-DEC-2010
10004 4 23-DEC-2010
The Result should be like that
Login_id Login_group Expiry_date
10001 2 23-DEC-2010
10002 2 23-DEC-2010
10003 3 23-DEC-2010
10004 4 230DEC-2010
Only those records in a Single ( Login_group ) should return
where all Login_id are expiry on 23-DEC-2010
The Login_id 100,101, 102 should all exclude from the SQL result as 102 is not Expiry on 23-DEC-2009 so all Records with login_group 1 are Excluded.
In Short Only those records should be return where all records in same Login_group are Expired on 23-DEC-2010.
Any hint is Welcome.
Thanks