Solved

Retrieve numeric data from Oracle table

Posted on 2003-11-05
4
370 Views
Last Modified: 2006-11-17
Hi,
a simple question if you had experience this before. How to retrieve a numeric data from a table in Oracle's  from SQL?

Actually, I want to insert a data into a table in SQL db but the data I pull from Oracle table. I manage to get the varchar2 and date column type data from Oracle, but when it comes to number, it give me this error message.

"Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error. The provider did not give any information about the error.
OLE DB error trace [OLE/DB Provider 'MSDASQL' IRowset::GetNextRows returned 0x80004005:  The provider did not give any information about the error.]."

This is a sample of my simple select statement that produce the above error:

select chartid from NEWEIS..EISADMIN.tbl_chart

****note : chartid is number(4)


 
0
Comment
Question by:mantech
  • 2
4 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 70 total points
ID: 9685601
all oracle numbers are basically floats ...

what data type is sql server assuming?

have you tried converting the oracle column to a string representation and
then converting that back for SQL server

post you sql statement for further help...

0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9689273
May be try something like this using openquery.

select * from openquery( LINKED_OLAP,
'select distinct [Customer Location:Country],
[Customer Location:State Province],
[Customer Location:City]
from sales' )
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9689294
Opps. That may not be for oracle.
0
 

Author Comment

by:mantech
ID: 9691242
Fyi,
I already try to convert but it didn't help. It seems SQL is having a problem to read the number value in Oracle. BTW, here are the sample:

select chartid from NEWEIS..EISADMIN.tbl_chart

select convert(integer,chartid) from NEWEIS..EISADMIN.tbl_chart

select convert(float,chartid) from NEWEIS..EISADMIN.tbl_chart
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now