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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of exceptions.

814


What is database white box testing and black box testing?

848


What is the difference between between and in condition operators?

722


What is user defined functions?

740


Does truncate release storage space?

762






Can ddl statements be used in pl/sql?

791


How many types of functions are there in sql?

661


What is difference between cursor and trigger?

752


what tools available for managing mysql server? : Sql dba

743


What is sqlerrm?

710


Mention what problem one might face while writing log information to a data-base table in pl/sql?

869


Explain the difference between sql and mysql.

751


What is raid? How does it help storage of databases?

791


What is difference between function and trigger?

711


how many values can the set function of mysql take? : Sql dba

716