Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Microsoft Query & Dates from Oracle

I am pulling data from an Oracle db into excel and am
writing the query in Microsoft Query accessed through
Excel. I am trying to utilize user specified criteria for
the date but it seems like there is a formatting issue. MS
Query keeps saying:

ORA-01843: not a valid month

I even copied a date from the unfiltered data displayed
and pasted it into the user entry field but still received
the same error. The data is showing up in the results
section as:

2000-05-01 00:00:00

But when I enter this into the Value field for MS Query it
changes it automatically to:

#05/01/2000#

which does return the correct information, but then the
user cannot specify what they want to enter at anytime
without modifying the query. I have had a lot of success
with SQL ODBC connections and tables, but this is the
first time I have tied to pull from Oracle. Im I making
some sort of newbie mistake? Any sugestions would be
greatly appreciated as I have tried about every format I
can think of for the user entered data and I keep getting
the invalid month error.

Thanks

Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Microsoft Query & Dates from Oracle

I was able to find out that I need to use Oracle's date
format which is:

DD-MMM-YY

That made all the difference. Thanks Tony M.

Matt D.

-----Original Message-----
I am pulling data from an Oracle db into excel and am
writing the query in Microsoft Query accessed through
Excel. I am trying to utilize user specified criteria for
the date but it seems like there is a formatting issue.

MS
Query keeps saying:

ORA-01843: not a valid month

I even copied a date from the unfiltered data displayed
and pasted it into the user entry field but still

received
the same error. The data is showing up in the results
section as:

2000-05-01 00:00:00

But when I enter this into the Value field for MS Query

it
changes it automatically to:

#05/01/2000#

which does return the correct information, but then the
user cannot specify what they want to enter at anytime
without modifying the query. I have had a lot of success
with SQL ODBC connections and tables, but this is the
first time I have tied to pull from Oracle. Im I making
some sort of newbie mistake? Any sugestions would be
greatly appreciated as I have tried about every format I
can think of for the user entered data and I keep getting
the invalid month error.

Thanks

Matt

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Microsoft Query & Dates from Oracle

"Matt D." wrote ...

I was able to find out that I need to use Oracle's date
format which is:

DD-MMM-YY

That made all the difference.


Is that really 'Oracle's date format' or are you merely making the
month unambiguous? Is it possible for the DBA to change 'Oracle's date
format' or is it always the same?

--
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Microsoft Query & Dates from Oracle

I believe there is a session level variable called nls_date_format, which
defaults to dd-mmm-yyyy

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"onedaywhen" wrote in message
om...
"Matt D." wrote ...

I was able to find out that I need to use Oracle's date
format which is:

DD-MMM-YY

That made all the difference.


Is that really 'Oracle's date format' or are you merely making the
month unambiguous? Is it possible for the DBA to change 'Oracle's date
format' or is it always the same?

--



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Microsoft Query & Dates from Oracle

"Rob van Gelder" wrote ...

Is that really 'Oracle's date format' or are you merely making the
month unambiguous? Is it possible for the DBA to change 'Oracle's date
format' or is it always the same?


I believe there is a session level variable called nls_date_format, which
defaults to dd-mmm-yyyy


It was meant as a heads up to the OP, along the lines of:

http://groups.google.com/groups?selm...g .google.com

This is your captain speaking. The irony filter has now been
extinguished.

--


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 3 May 12th 07 03:06 AM
MS Query Oracle syntax Jeff[_3_] Excel Discussion (Misc queries) 0 May 11th 07 09:26 PM
Pivot Table, MS Query and Oracle Monika Excel Discussion (Misc queries) 2 March 29th 06 02:16 PM
Problem accessing Oracle Public Synonyms from Microsoft Excel 2002 Sandeep Excel Discussion (Misc queries) 1 January 5th 05 09:31 AM
Using MS Query to Push Data to Oracle Chris Rettke Excel Programming 1 January 30th 04 12:58 PM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"