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
How to use distinct and count in sql query? Explain
what are the join types in tsql? : Transact sql
Is sql microsoft?
What does trigger mean in psychology?
What is meant by cursor in sql?
Why cross join is used?
how to install mysql? : Sql dba
Which is better stored procedure or query?
What is the mutating table and constraining table?
What is user defined functions?
What is faster join or subquery?
What is a string data type in sql?
What is a memo field?
Is oracle and sql same?
how would you get the current date in mysql? : Sql dba