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 1 No

Post New Answer

More SQL PLSQL Interview Questions

what are the different index configurations a table can have? : Sql dba

0 Answers  


How is Oracle 10g helpful when compared to oracle 9i and what is grid computing

1 Answers   Flextronics,


Mention what does the hierarchical profiler does?

0 Answers  


What is trigger in pl sql?

0 Answers  


difference between pl/sql table and normal pl/sql table

2 Answers  






What are the parts of a basic sql query?

0 Answers  


Does a user_objects view have an entry for a trigger?

0 Answers  


What are functions in sql?

0 Answers  


Can you have multiple SPs with the same name on a database?

2 Answers   CGI, Quest,


What are different types of joins ?

5 Answers   BirlaSoft,


From an Employee table, how will you display the record which has a maximum salary?

29 Answers   Cap Gemini, Exilant, Synechron,


How many sql databases can you have on one server?

0 Answers  


Categories