Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pulling 'current date' data from Oracle into Excel

Re: Pulling 'current date' data from Oracle into Excel

From: Mark D Powell <mark.powell_at_eds.com>
Date: 16 Jul 2002 06:27:29 -0700
Message-ID: <178d2795.0207160527.14894252@posting.google.com>


"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in message news:<3d33ef40$0$230$ed9e5944_at_reading.news.pipex.net>...
> SELECT SYSDATE FROM DUAL;
>
>
> --
> Niall Litchfield
> Oracle DBA
> Audit Commission UK
> *****************************************
> Please include version and platform
> and SQL where applicable
> It makes life easier and increases the
> likelihood of a good answer
>
> ******************************************
> "Richard Edwards" <richard_at_not.my.address.com> wrote in message
> news:iJRY8.73$8Y.832_at_news.uk.colt.net...
> > All,
> > I have an Oracle database that contains stock prices.
> > I would like to pull the data for the current day into Excel. So far I
> can
> > download the data and using MS Query manually specify the current date in
> > the criteria field.
> > Is there anyway I can automate this? Is there a 'system date' variable?
> >
> > Thanks.
> >
> > Richard
> >

Richard, Niall, gave you the right function to see the current date in Oracle, but just to make sure you understand how to use it in your case I think you would to code something like: where trunc(date_col) = trunc(sysdate)

Oracle stores the time with the Date information so if your table has a column with the trade or stock price date you might need to eliminate time from the equation. See the SQL Manual chapter on single row functions for to_date and to_char to see how to move data into and out of date columns.

Received on Tue Jul 16 2002 - 08:27:29 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US