• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 965
  • Last Modified:

ORA-01858

I have an SQL Query that I'm running from Microsoft Excel to extract data from an Oracle database. I have successfully run this query on 2 computers, however, for some reason, when I run this query on my lap top, I get an ORA-01858: a non-numeric character was found where a numberic is expected error. I have isolated the problem, and found that this line is causing the issue: AND c.START_TIME >= '1-JUN-2005'
AND c.START_TIME < '7-MAY-2006'

If I remove these lines, the query will run on my lap top.

I suspect there is a date format setting that is mis-aligned on this computer, but I can't for the life of me find that setting. My system settings (Windows XP) for long and short date formats are the same on all computers, as are the date settings in MS Excel. I am running Version 9.00.01.08 of the Oracle ODBC driver on all machines as well.

Does anyone have any idea what setting might be messed up on this computer?

Thanks for your help.

Dave
0
dcmaslen
Asked:
dcmaslen
2 Solutions
 
GGuzdziolCommented:
I suppose this will help:

AND c.START_TIME >= TO_DATE('01-JUN-2005', 'DD-MON-YYYY')
AND c.START_TIME < TO_DATE('07-MAY-2006', 'DD-MON-YYYY')
0
 
mohammadzahidCommented:
Ora-01858 error can occur if Left-Value does not match Righ-Value when comparing. I agree with GGuzdziol solution. If not, then please paste the DDL of the tables used in the query and some sample data.
0
 
atufaCommented:
I had same error like Dave and finally I solved. ;)

The problem was regional settings when Oracle client was intalled. The NLS_LANG of server should be same at the client.

For this, check the NLS_LANG key from registry into
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
 
0
 
JimBrandleyCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
SPLIT between GGuzdziol(16677871) and atufa(16869368)

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

JimBrandley
Experts Exchange Cleanup Volunteer
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now