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 the main reason behind using an index?
What is the default isolation level in sql server? : Transact sql
What is the use of function in sql?
How will you distinguish a global variable with a local variable in pl/sql?
How many commands are in sql?
What is the difference between sum and count in sql?
Explain the purpose of %type and %rowtype data types?
Is sqlite good enough for production?
What are the advantages of stored procedure?
Can function return multiple values in sql?
Is a view faster than a stored procedure?
What is cursor and its types?
What is mutating sql table?
Which join condition can be specified using on clause?
Which tcp/ip port does sql server run?