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

How to use distinct and count in sql query? Explain

0 Answers  


What are the types of records?

0 Answers  


What is memory optimized table?

0 Answers  


What is the difference between delete, truncate and drop command?

0 Answers  


What is bitemporal narrowing?

0 Answers  






What does partition by mean in sql?

0 Answers  


What is the difference between a primary key and a clustered index?

0 Answers  


Explain the components of sql?

0 Answers  


Can a view be mutating? If yes, then how?

0 Answers  


Explain the order of sql statement execution?

0 Answers  


What is the best partition size for windows 10?

0 Answers  


What does rownum mean in sql?

0 Answers  


Categories