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 is dynamic SQl and how you will create and execute dynamic sql?
what are null values? : Sql dba
Is postgresql a server?
What is trigger in pl sql?
How can one get sql*loader to commit only at the end of the load file? : aql loader
What is the Difference between Procedure and Function.Can we call a Function in a DML?
What is dbo in sql?
How many commands are in sql?
What is the basic structure of PL/SQL ?
How many scalar data types are supported in pl/sql?
what is ref cursor in pl/sql?
can i write pl/sql code in a package
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)