SQL Language (MOSC)

MOSC Banner

Need SQL idea

edited Oct 1, 2015 3:22PM in SQL Language (MOSC) 3 commentsAnswered

HI All,

I have data in below format.

             

StaffDateHours Worked
1234507-sep-156
1234508-sep-156
1234607-sep-158
1234608-sep-158
1234707-sep-1510
1234708-sep-1510
1234807-sep-158
1234808-sep-158

I would like to have the data represented as:

                          

StaffWeek Beginning
  (07 Sep2015)
Week Beginning
  (14 Sep2015)
Week Beginning
  (21 Sep2015)
Week Beginning
  (28 Sep2015)
12345
12346

1.I need to calculate the sum of hours worked for one week from (mon to sun) for all the employees

2.i need to be able dynamically change the week columns to   for the next month for eg: OCTOBER should be 05-OCT-2015,12-OCT-2015,19-OCT-2015,26-OCT-2015  and generate a report for one month

Thanks for any valuable inputs!

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center