amrog
MIS
- Mar 18, 2008
- 22
I have a table with the following data:
Code Effective_date
A 1/1/2008
A 1/2/2008
A 15/5/2008
B 1/1/2008
B 15/2/2008
C 1/2/2008
C 1/4/2008
I need to get the following output:
Code Effective_1 Effective_2
A 1/1/2008 31/1/2008
A 1/2/2008 14/5/2008
A 15/5/2008 Null
B 1/1/2008 14/2/2008
B 15/2/2008 Null
C 1/2/2008 31/3/2008
C 1/4/2008 Null
I need this using one single SQL statement without any Packages.
Is it possible? I need your help.
Code Effective_date
A 1/1/2008
A 1/2/2008
A 15/5/2008
B 1/1/2008
B 15/2/2008
C 1/2/2008
C 1/4/2008
I need to get the following output:
Code Effective_1 Effective_2
A 1/1/2008 31/1/2008
A 1/2/2008 14/5/2008
A 15/5/2008 Null
B 1/1/2008 14/2/2008
B 15/2/2008 Null
C 1/2/2008 31/3/2008
C 1/4/2008 Null
I need this using one single SQL statement without any Packages.
Is it possible? I need your help.