|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to get the Missing dates between two dates in the table?
Hi Am Using Unix Ksh ... I have a Table called date Code:
select * from date ; Date 01/02/2013 06/02/2013 I need the output as Code:
Missing Date 01/02/2013 02/02/2013 03/02/2013 04/02/2013 05/02/2013 06/02/2013 Can anyone help me pls............ |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
I am no dba but what i would do is dump the table into a flat file...fill in the missing date time rows using perl...load it back into the date table...and if all of this sounds like baloney feel free to ignore it...
|
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
You can use
ALL_OBJECTS to generate missing dates: Code:
select to_char(to_date('01/02/2013','dd/mm/yyyy') - 1 + rownum, 'dd/mm/yyyy') from ALL_OBJECTS
where to_date('01/02/2013','dd/mm/yyyy') - 1 + rownum <= to_date('06/02/2013','dd/mm/yyyy');
01/02/2013
02/02/2013
03/02/2013
04/02/2013
05/02/2013
06/02/2013 |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Generating dates between two dates | sathishsr | Shell Programming and Scripting | 4 | 08-09-2012 12:41 AM |
| How to write the dates between 2 dates into a file | dsfreddie | UNIX for Dummies Questions & Answers | 5 | 06-20-2012 09:11 PM |
| Replacing dates]] with (dates)]] | lawstudent | Emergency UNIX and Linux Support !! Help Me!! | 20 | 01-19-2011 03:13 PM |
| SQL: find if a set od dates falls in another set of dates | vertical98 | Programming | 0 | 10-16-2010 01:31 AM |
| Need script to generate all the dates in DDMMYY format between 2 dates | frozensmilz | Shell Programming and Scripting | 2 | 01-29-2009 05:06 AM |
|
|