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 a null value?
What is meant by <> in sql?
What are triggers in sql?
explain about mysql and its features. : Sql dba
How many types of tables are there?
Explian rowid, rownum? What are the psoducolumns we have?
If a View on a single base table is manipulated will the changes be reflected on the base table?
how do you login to mysql using unix shell? : Sql dba
What is a pragma statement?
How many columns should be in an index?
Is it possible to use LONG columns in WHERE clause or ORDER BY?
What are the ddl commands?
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)