Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem with openquery from SQL Server 2012 Connecting to Progress thru odbc Linked Server Expand / Collapse
Author
Message
Posted Friday, June 13, 2014 2:50 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, June 14, 2014 2:51 PM
Points: 3, Visits: 5
Hi Team,

I have the below query:
Select tmp.* from openquery( [LinkedServerName], 'select * from viewname1' ) as tmp.

When I executed this query, I am getting below error. Could you please help?
Msg 7354, Level 16, State 1, Line 1
The OLE DB provider "MSDASQL" for linked server "LinkedServerName" supplied invalid metadata for column "columnname". The precision exceeded the allowable maximum.

Column Details at Source (Progress): (As I don't have any form of access to Progress DB, I am not able to provide you its version)
Field Name Field Label DataType Format Extent Initial
DailyBalance Daily balance decimal zz,zzz,zzz,zz9.99- 12 0

In SQL Server:
Field Name DataType Format
DailyBalance Numeric (26,2) - Based on existing program guidance from team management, I doubled the size in SQL Server compare to Progress.

Basically, I am pulling all records from ODBC View thru Linked Server and storing into a local table type variable. Then insert into a permanent table. All theses are in procedure.

Before I executed the procedure, I wanted to check thru manual execution. But keep getting the above error. I increased the format to numeric (30,2), (30,4) but no luck.

Your prompt help is greatly appreciated

Thanks
Gladias

Post #1580742
Posted Friday, June 13, 2014 4:19 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, June 14, 2014 2:51 PM
Points: 3, Visits: 5
Hi All,
I found a fix at http://knowledgebase.progress.com/articles/Article/000046672 and it worked when I used CAST(DailyBalance AS NUMERIC(38,6)). However, when I executed the procedure with the sam emodifications, I am still getting the same error. Thus, the problem still exists. I am still researching it...
Thanks
Gladias
Post #1580745
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse