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
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What is the usage of distinct keyword?
what is sql? : Sql dba
what is a cursor? : Sql dba
How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?
What is dml statement?
How to get unique records from a table?
How to select 10 records from a table?
What is the purpose of the partition table?
How to write a query to show the details of a student from students table whose
What is rename in sql?
What is the difference between a primary key and a unique key?
What is trigger with example?
Is not null in sql?
What does bitemporal mean?