I’m really stuck here.
e.g past_data table.
name|date |hour |data
____________________________________________________________
je |06/05/2012|1 |32323
je |06/05/2012|2 |43564
je |20/05/2102|3 |12334
je |06/05/2012|4 |123123
je |13/05/2012|1 |133223
new_table
name|date |hour |data
____________________________________________________________
je |06/05/2012|1 |32323
je |06/05/2012|2 |43564
je |20/05/2102|3 |12334
je |06/05/2012|4 |123123
How do I write a program to find all day matches current day (today is Sunday) from column “date” table “past_date” copy to talbe “new_table”. In the example you can see row with date = 06/05/2012 and 20/05/2012 from past_date table were copied into new_table because those two date are Sundays.
Then to loop this process 13 times (weeks in total) increasing 1 day each time e.g sunday then monday then tuesday so on.
Please help.
You don’t need PLSQL for this,
try this:
UPDATE: I really don’t understand why and what is it good for, but since you asked…
If you use PLSQL then you can do: