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 / 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 |
What does fetching a cursor do?
How do sql databases work?
What is the basic structure of PL/SQL ?
What is orm in sql?
What is the function that is used to transfer a pl/sql table log to a database table?
Is sql open source?
How do you sort in sql?
How do you create a unique index?
What is not in sql?
What is auto increment?
How are multiple column = value pairs delimited in the SET clause of an UPDATE statement? 1. With commas (SET price = 0, status = 'I') 2. With parentheses (SET (price = 0) (status = 'I')) 3. With double-pipes (SET price = 0 || status = 'I') 4. With square-brackets (SET [price = 0] [status = 'I'] 5. With single or multiple spaces (SET price = 0 status = 'I')
What is INSTEAD OF trigger ?