Time of year and month to generate

Hello

How can I generate years and months certain period, by using a single query

Example: I would like to generate every month between 2010 and 2012, it shows

201001

201002

...

..

201012

201101

201102

..

201112

201201

201202

201203

....

....

201212

How can I make using query without using cursor?

TIA

using

Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE Production 11.2.0.4.0

AMT for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

So, technically... you always use a cursor.

Select add_months (date ' 2010-01-01', rownum-1)

OF the double

connect add_months (date ' 2010-01-01', rownum-1)<= date="">

/

would give you a start every day of a month of 01/2010 to 12/2012 as a DATE!

HTH

Tags: Database

Similar Questions

  • I had Adobe Cloud (all applications) to 32.98 USD more than two years now, I have wanted to renew but new contract price is $79.98 - I only use Dreamweaver maybe three times a year, maybe pro adobe acrobat 4 times per year and photoshop maybe 2 times. Is

    I had Adobe Cloud (all applications) to 32.98 USD more than two years now, I have wanted to renew but new contract price is $79.98 - I only use Dreamweaver maybe three times a year, maybe pro adobe acrobat 4 times per year and photoshop maybe 2 times. Is there a plan months I can go that is close to the $32 per month?

    Hi Justin,

    The full price creative Cloud for individuals is $49.99 / month.

    If you add the broth, it's when you pay $79.98 / month.

    Please visit:-Creative Cloud price and membership plans | Adobe Creative Cloud

    For support:-contact us | Adobe

  • How to export pictures / albums of iPhotos to external disk and keep the time/date/year and location information changed?

    How to export pictures / albums of iPhotos to external disk and keep the time/date/year and location information changed?

    Menu, file == > export - check boxes to include metadata and location- export to iPhoto

    LN

  • How can I use the program only a few times (less than ten times) a year and pay less?

    Hello. My name is Vladimir. Last month, I installed Adobe Photoshop and paid 299 rubles for creative cloud for photographer (year). The next day, I installed Adobe Premier and paid 1500 rubles for Creative Cloud (year). I assumed it was costs for the whole year and I was very surprised when my card yesterday again withdrew these two sums of money. This price is too much for me because I use these two programs just maybe 6 times a year - after the party. You can stop taking my money and advice me another (better) way to get legal software for money, just at the moment where I need? Thanks in advance.

    Contact adobe during the time pst support by clicking here and, when available, click on "still need help," http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • How to filter the blog by year and month not only? Please help ASAP!

    Hey everybody!

    Does anyone know any code so that I can filter by year in the catalyst for business blog feature? at the moment I can do only a month.

    Quick help would be greatly appreciated!

    Thank you!

    James

    Hi James,

    Are you talking about so there blog post filtering filtered by year?

    If so I suggest to create tags for 'years' and then assign the ticket to blog as a result.

    Once completed, it will appear like this on the front-end server in your overall layout of blog.

    I hope this helps!

    -Sidney

  • Extract data based on the year and month

    My clients have taken a field TimeStamp DB Oracle and downloaded the access in a TEXT field format.
    Samples: 20060401001348CS

    Everything I'm doing is extracted from the data based on the year and the month. I equal to 200604 *, 200604%. Have also tried to use AS.
    Nothing works. It may just be that dificult. Help, please. Thank you

    Mike

    I'm SO sorry. I have 35 years of Experinece in this area and I have my data (assuming) was all a 200604 date and he was not. The query did work. I'll have more questions and that you do not want to loose credability with this site. Again, I am sorry. Sincere to help thanks.
    Ron

  • I have problems with D4.1 in Labview ' 09. It is said to determine the age of a person in years, when given the month in course, day, and year and month of birth of the person, day, and year

    Seen someone's birth month day and year... and also the day of the current month and year like entries... calculate their age, years... as output... age should not increment by one until the arrival of their birthday this year.   I can't get the coding right... Please help


  • Count the days back by year and month?

    In my doc, I have 7 text fields (Sun, Mon, Mar, sea, game, Fri, SAT). I use another field enter a date. When I enter an end date, I have 7 fields to be filled with dates. For example, if I enter the date field 06 18, 2016, I wish I had the 7 fields like this, Sun would show 12, Lun would show 13, AUT show 14, sea would indicate 15, game show 16, Fri would show 17 and Sam would have 18. I'm counting the days is backwards because I'm coming the weekend of date (always a Saturday).

    What I'm running is the month before sometimes will have 30 days, some months have 31 (and of course leap years). Thus, for example, if I choose 2 July 2016 days should come back like that, Sun should see 26, LUNs should show 27, Tue should show 28, sea should show 29, that game should show 30, Fri should show 01, Sam should show July 02.

    How can I do this correctly? I need a javascript smart thing to do. Can someone please help me with an example? Thank you.

    Here is a link to a sample form that shows how you can do this: http://acroscript.net/pdf/demos/populateWeek.pdf

    The script is located in the field Validate event entry date. Note that day fields use a special naming convention that allows a simplification of the code, so you have to use a similar model.

  • How to get the year and month of a whole year

    Hello

    I have a list of selection and when the user selects the list values are like this 201101,201102,201103

    I tried like this


    declare
    T_DATE varchar2 (25);
    Start
    because me in 1.12 loop
    Select TO_CHAR (ADD_MONTHS (SYSDATE, + 1), "YYYYMM") in the double T_DATE;
    dbms_output.put_line (V_DATE);
    end loop;
    end;

    But its bad and I can not get clear idea where to change the code

    Thanks and greetings
    Srikkanth.M

    Srikkanth.M wrote:
    Hello

    I have a list of selection and when the user selects the list values are like this 201101,201102,201103

    If you want to list for the current year from Jan 201101,201102, 201103... 201112, then try this

    DECLARE
      v_Date  VARCHAR2(25);
      n_month NUMBER;
    BEGIN
      SELECT extract (MONTH FROM sysdate) INTO n_month FROM dual;
      FOR i IN 1..12
      LOOP
        SELECT TO_CHAR(ADD_MONTHS(SYSDATE, (i-n_month)), 'YYYYMM')
        INTO v_date
        FROM dual;
        dbms_output.put_line(v_date);
      END LOOP;
    END;
    

    Vivek L

  • GregorianCalendar adding year and month

    Hi all

    I am trying to create a package using Gregorian calendar where I expect a result comparable to 20101029 (YYYYMMDD)

    So I created a code

    / code

    package com.cera.hyperionUtils;
    Import Java.util;

    public class HypDate {}

    public static int yearmonthday (Field1 int)
    {
    1 declare the calendar
    Calendar c = new GregorianCalendar();
    c.setLenient (true);

    2 perform operations
    3. extract and return the result
    int = Calendar.YEAR field * 10000 + Calendar.MONTH * 100 + Calendar.DAY_OF_MONTH;
    Return c.get (field);
    }

    Public Shared Sub main (String [] args)
    {
    System.out.println (HypDate.yearmonthday (1));

    }
    }

    / code

    But then it gives me an error.

    Can someone help me with this?

    Published by: Madeleine Kattookaran, 28 October 2010 13:23

    1. in the validation of code, surround with [code] and [/ code] (without the spaces within the brackets). Use the Preview tab to view the appearance before submitting your message.

    2. you must be precise, complete and clear in your requirements. It is difficult for people who will help you if you their capture.

    It is not really clear what you mean by "add an option where the user can choose. Do you mean they get specify everything they want? Or you're going to give them a selection of a few to choose? In one case, I don't see where is the problem. If you know how to use SimpleDateFormat with a specific format string, then you know how to use it with other institutions.

    Obviously, you will have to change

    public static final String DATE_FORMAT_NOW = "yyyyMMdd";
    

    something which sets the string format correctly when it is selected or entered.

  • partitioning in 11g by year and month

    Hello

    I use oracle 11g and oracle 9i database data migration.
    9i has given since 2001 until 2010 Leave a how about every year will be 12 million records, monthly around 1 M

    11 g, must now create this annual partion table from 2001 to 2009
    and since 2010 Jan leave the partition should be monthly and is expected to grow automatically.

    How do I create partion table annual (2001 to 2009) and a monthly interval partion (2010 Jan go and grow) in 11g?

    Here is the sample table for an eg..
    
    
    -- this is for 2010
    create table sales
    (
       sales_id    number,
       sales_dt    date
    )
    partition by range (sales_dt)
    interval (numtoyminterval(1,'MONTH'))
    (
       partition p001 values less than (to_date('2010-02-01','yyyy-mm-dd'))
       partition p002 values less than (to_date('2010-03-01','yyyy-mm-dd'))
    );

    In fact, it should be:

    create table sales
    (
       sales_id    number,
       sales_dt    date
    )
    partition by range (sales_dt)
    interval (numtoyminterval(1,'MONTH'))
    (
       partition p001 values less than (date '2002-01-01'),
       partition p002 values less than (date '2003-01-01'),
       partition p003 values less than (date '2004-01-01'),
       partition p004 values less than (date '2005-01-01'),
       partition p005 values less than (date '2006-01-01'),
       partition p006 values less than (date '2007-01-01'),
       partition p007 values less than (date '2008-01-01'),
       partition p008 values less than (date '2009-01-01'),
       partition p009 values less than (date '2010-01-01')
    )
    /
    

    SY.

  • Year and month display

    Hello

    I need display the date format MONTH-YYYY in a SQL query, the query Condition is like that

    If I run the query today it should show from May to November 2012 (IE interval of 6 months)

    If I run the same question next month must show Jun-2012 December 2012 (IE interval of 6 months)

    Based on the date system, should it complete the date rate please suggest me how to get these date ranges.

    Thank you
    Sudhir
    /* Formatted on 2012/05/22 15:02 (Formatter Plus v4.8.8) */
    SELECT TO_CHAR (SYSDATE, 'MON RRRR'), TO_CHAR (ADD_MONTHS (SYSDATE, 6), 'MON RRRR')
      FROM DUAL;
    
  • Year (date) and Month (date) "YYMM" in number.

    In the column 'G' I use the formula = month (date)

    In the column 'H' I use the formula = year (date)

    Is it possible to use the formula above to create a "YYMM' as the column 'I '?

    Column 'G and H' will be deleted if the column 'I' is the work.

    Hi LV.

    Here is an example of use of Numbers ' 09. The first method (in column (C) is feasible in 3 numbers; the second is maybe not.

    Columns C and D are left in the default auto format (and alignment).

    Column C, automatically align left, excerpts from the last two formatted numbers Year() then extracts and oncatenates the last two digits of a string built consisting of two zeros & the number Month() one or two. The result is a text string of four digits, as shown.

    C2 and filled down: = RIGHT ((B), 2 YEAR) & RIGHT ("00" & MONTH (B), 2)

    Column D simply copies the string Date and time of B and displays it by using a custom format, showing that the two-digit year & the monthnumber double-digit.

    D2 and filled down: = B

    Custom format for the cells D2 - D8:

    Kind regards

    Barry

  • calculate the time in seconds, the day of the year and year

    I have a data file where they record three columns, the seconds elapsed since midnight, day of the year and the year.  I am creating a timestamp of LabVIEW from these three numbers.  Of seconds elapsed since midnight, I can create seconds, minutes and hours.  If I feed in a cluster of time with the day of the year and the year, the timestamp of output is 0.  Does not work.  Although an input of the day of the year element, the Date and time with seconds function apparently requires day for months and months to work.

    The only solution I can imagine at this stage is to calculate the month and the day of the day of the year, which would imply a choice of the month table and a check of the leap year.

    Smart solutions, I'm missing?

    DaveT

    Dave,

    I found a Julian Georgian so far.

  • The on-site warranty DELL Web starts at 1 year and 4 months before my purchase

    Hello.

    I bought my laptop with a reseller/distributor in July 2015.

    However, when I connect to the DELL Web site with my service tag he said "delivered in March 2014. It is a difference of 1 year and 4 months.

    Should I be worried? How it actually works? Judging by the site Web of DELL my warranty will end earlier than the guarantee given by the dealer. But this means that, after the expiry of the warranty on the site I can be service by that particular dealer?

    Thanks in advance.

    Hi Martincho8002,

    Thanks for posting on the Dell Community.

    Unfortunately, dealers sometimes take place products in their inventory for long periods of time before selling them.  Please fill out the registration form to transfer the product in your name.  If your system will be guaranteed by the seller or by Dell would be determined by the Conditions you agreed at the time of purchase.  Please read your contract and if you need assistance, please post back.

    Kind regards
    Robert

Maybe you are looking for

  • Satellite A80 - help for upgrading memory

    Hi guys so I have a Toshiba Satellite A80 and I was hoping to upgrade the memory. I know it can go up to a maximum of 2 x 1 GB slots I was wondering if you guys can help me out what say me will only work or all memory chip work? I had the experience

  • HP Photosmart Essential

    On my HP Pavilion a1310n pc, I have two Photosmart Essential and Essential 3.0.  Should I remove the first?

  • OfficeJet 6100 Wireless: Officejet 6110 does not print Gmail or IE screens

    My officejet 6100 works wireless.  I have a Pavilion with Windows 7.  Until two days ago, I was able to print any screen, document, or Gmail by selcting 'print '.  Now, everything I print is MS docs and some downloaded version printable screens of Gm

  • HP 8600 more unresponsive when you print from MacBook Pro

    I just bought a HP Officejet Pro 8600 Plus and I am using the printer on a network with windows and mac (layer, Imac, macbookpro). Printing with my windows (windows 8) are no problem. However the print with my macbook and the tablet will not work. Or

  • I have a carrier jam, how do I access the lower part of my printer

    I had a paper get stuck in my Dell V305 printer. We got out all the papers that we could see. It says "clear carrier jam". How can I access the back or the bottom of the printer, or how do I clear carrier jam?