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






i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that..

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 0 No

Post New Answer




More SQL PLSQL Interview Questions

Types of cursor locks and explanation each of them ?

3 Answers   DELL, HP Finsoft,


Can we use more than one null value for unique key?

31 Answers   Wipro, A1 Technology,


The select into statement is most often used to create backup copies of tables or for archiving records?

0 Answers  


What are the uses of merge?

0 Answers  


1 SELECT a.field1, b.field2, c.field3, d.field4 2 FROM atable a, atable b, ctable c, dtable d 3 ? 4 ORDER BY 1 What is the minimum number of joins that must be specified on line 3 in the sample code above to properly link the tables? Notice that the table "atable" is aliased twice: once as "a" and once as "b." 1. One join 2. Two joins 3. Three joins 4. Four joins 5. Five joins

6 Answers   Sonata,






What is window clause?

1 Answers   TCS,


What is the location of pre_defined_functions.

0 Answers  


What does closing a cursor do?

0 Answers  


Can you call pl/sql package functions from within a fast formula?

0 Answers  


What is mutating sql table?

0 Answers  


2. Select A.A from ( select 1 as from dual Union select 1 as from dual)A Full outer join ( select 1 B from dual Union select 2 B from dual)B On A.A=B.B

1 Answers   Fintellix,


How does one use sql*loader to load images, sound clips and documents? : aql loader

0 Answers  






Categories