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
what is rdbms? : Sql dba
If a cursor is open, how can we find in a pl/sql block?
What is the primary key?
Explain normalization and what are the advantages of it?
What version is sql?
What is the difference between a procedure and a function?
What are the popular database management systems in the it industry?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
When is the explicit cursor used ?
Can you select everything, but 1 or 2 fields, without writer's cramp?
What are crud methods?
What is the difference between function, procedure and package in pl/sql?
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?
What is the clause we need to add in function body to return variable?
how can we destroy the cookie? : Sql dba