I don't know whether it is possible in oracle..
I am sorry if it is a stupid question..
I want a query to view in punch and out punch of employees in two columns.
My table looks like..
-------------------------------------------------------------------------------------
Employee_ID Punch_time Punch_type
-------------------------------------------------------------------------------------
1 01/04/2014 9:00 in
1 01/04/2014 5:00 out
1 02/04/2014 5:00 out
1 03/04/2014 9:00 in
1 04/04/2014 9:00 in
--------------------------------------------------------------------------------------------
I want the out put as
-------------------------------------------------------------------------------------
Employee_ID IN OUT
-------------------------------------------------------------------------------------
1 01/04/2014 9:00 01/04/2014 5:00
1 null 02/04/2014 5:00
1 03/04/2014 9:00 null
1 04/04/2014 9:00 null
--------------------------------------------------------------------------------------------
I want to create view as above.
I know it can be done through a programming language and insert into a table. But that wouldn't be useful for me.
Because i will have to insert punches in the middle (Example if an employee forget a punch and request to regularise).
In that case i will have to reprocess all the punches ..
In order to avoid this i am looking for a view..
Is it possible to create a view as mentioned above?
Please help..