•   DOC[U]MENT
    • Login
  •   Disclaimer
  •   Useful Source
  •   Project
    • Access2Csv [FreeWare]
    • Ip2Country [Service API]
    • Reformator [FreeWare]
      • GLO INPUT
      • GLO TEMPLATE
      • GLO OUTPUT
      • INPUT
      • EXPRESSION
      • TEMPLATE
      • OUTPUT
      • Reformator 0.12
  •   Download
  •   Paper
    • ORACLE
      • ORACLE - ORA-01017
      • ORACLE - ORA-12154
      • ORACLE - ORA-12696
      • ORACLE - ORA-12699
      • ORACLE - CASE WHEN
      • ORACLE - Deffered
      • ORACLE - DROP COLUMN
      • ORACLE - Privilege View
      • ORACLE - 365 DAYS
      • ORACLE - CREATE TABLE
      • ORACLE - Database Vault
      • ORACLE - INDEX
      • ORACLE - Questions
      • ORACLE - Raise Error
      • ORACLE - Temporary Table
      • ORACLE - Win7 Laptop
      • ORACLE - Switch User
    • C++
      • C++ Array as argument
      • C++ Constants and Volatiles
      • C++ Functions
      • C++ Reference vs Pointer
    • Solaris
      • Unix - Add/Mod/Rem Users
      • Unix - Crontab
      • Unix - Enumerate Groups
      • Unix - File Navigation Bases
      • Unix - File Permissions
      • Unix - Shell Autocomplete
    • How to..
      • ORACLE@AMD64
      • Open .BIN file
    • Drupal: EME
  •   Author
    • Curriculum Vitae
    • Contact

In order to form an immaculate member of a flock of sheep one must, above
all, be a sheep.

— Albert Einstein

ORACLE - 365 DAYS

Sun, 11/21/2010 - 17:55 |  Juraj Maslik

How to select all the days from this year in ORACLE?

SQL>SELECT 
  TRUNC(CURRENT_DATE,'YEAR')- 1 + LEVEL AS DAY
FROM 
  DUAL 
CONNECT BY LEVEL<=365;

DAY
---------
01-JAN-10
02-JAN-10
03-JAN-10
04-JAN-10
05-JAN-10
...
Juraj Maslik | Document - Extract and Share | Access2Csv | Reformator | Download
Oracle Articles | Oracle Certified Expert | Oracle Certified Associate | Unix Systems Administration | SEO
© 2010 [document.sk, soap.sk, hand.sk]
document.sk on facebookdocument.sk on ftwitter