i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that.example jan has 4 weeks
i need 1st dd for evry wk






i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that..

Answer / kavitha singh

select year,week,date1,to_char(date1,'Day') day
from
(
select year, week,
next_day( to_date( '04-jan-' || year, 'dd-mon-yyyy' ) + (week-2)*7, 'mon' ) date1
from (select '2011' year, rownum week from all_objects where rownum <= 53 ))

Is This Answer Correct ?    10 Yes 0 No

Post New Answer




More SQL PLSQL Interview Questions

What are code pages ?

0 Answers   BirlaSoft,


Where the integrity constrints are stored in Data Dictionary?

1 Answers  


In a Distributed Database System Can we execute two queries simultaneously ? Justify ?

3 Answers  


What are the types of SQL Statement?

3 Answers  


What is a mutating table

4 Answers   Tech Mahindra, TCS,






Do view contain data?

6 Answers   Ramco,


How did you export data from database to excel file.

1 Answers   TCS,


what is mean by forward declaration and where we'll use it.

4 Answers   TCS,


what is explain plan?, given an example...

3 Answers   Polaris,


How packaged procedures and functions are called from the following?

2 Answers  


What is the Subquery?

4 Answers  


Difference between views and materialized views?

5 Answers   BirlaSoft,






Categories