LIST between DATES!
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: LIST between DATES!

  1. #1
    Join Date
    Apr 2001
    Posts
    19
    Hi!
    I want a query to list dates between two given dates.

    Thank you!

  2. #2
    Join Date
    Jan 2001
    Posts
    153
    Hi

    Select , from

    where
    betweeen and

    Vijay.s

  3. #3
    Join Date
    Jan 2001
    Posts
    153
    Hi

    Select col1,col2 from
    tablename
    where
    datecol betweeen date1 and date2

    Vijay.s

  4. #4
    Join Date
    Sep 2000
    Posts
    47
    Plz give more details. Do you want to display all dates stored in your database and that are falling between given two dates ??? or just want to get dates between two dates (as in calender) ???

  5. #5
    Join Date
    Feb 2001
    Posts
    203
    This query will give you the emp names who joined between
    Mar 01 to Mar 31.

    select emp_name from employee
    where date_of_joined between '01-MAR-01' AND '31-MAR-01';

    Hope it will work, If not give us some more details like
    what table,column,critiria...etc. Good Luck
    sree

  6. #6
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    If you want to list all the dates between two given dates (start_date and end_date) )then try the following:

    SELECT start_date - 1 + ROWNUM
    FROM all_objects
    WHERE ROWNUM <= end_date - start_date;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  7. #7
    Join Date
    Apr 2001
    Posts
    19
    Hi!
    I want to show dates between two given dates. This using "dual" table.

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Why do you want to stick with dual? Dual has only one row, so it can return you only one date. You need a table or view that has at least so many rows as the dates you want to display. So what is wrong with the sollution with ALL_OBJECTS (or some similar publicly accesible view/table)? It is accesible to every user, the same way the DUAL.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    Aug 2007
    Posts
    2
    I want to list all the dates between two given dates (start_date and end_date)

    where start_date = minimum date from a table
    and end_date = sysdate

    can u please guide for generating query for this

  10. #10
    Join Date
    Apr 2006
    Posts
    377
    So you reply to an 8 yr old thread??

    What have you tried?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width