Link to home
Start Free TrialLog in
Avatar of rhservan
rhservanFlag for United States of America

asked on

Msg 7347, Level 16, State 1, Line 1

I am finishing up a migration to sql 2012 when this error below occurrs when I run the view on the sql 2012 server:

OLE DB provider 'OraOLEDB.Oracle' for linked server 'XXXXX' returned data that does not match expected data length for column '[OraOLEDB.Oracle].SOURCE'. The (maximum) expected data length is 64, while the returned data length is 30.

I am running this view which has been working and still does work on a sql 2008 server.
This view performs an openquery on XXXXX and the SOURCE Column is created as below:

select * from openquery(XXXXX,'
            SELECT   ''Custom Calc'' source')

This creates a column named 'source' and populates the column with 'Custom Calc'
ASKER CERTIFIED SOLUTION
Avatar of Rindbaek
Rindbaek
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rhservan

ASKER

Hey thanks Rindbaek for the prompt response,

After I cast as a varchar it worked fine.
Below is the solution:

select * from openquery(XXXXX,'
            SELECT  CAST(''Custom Calc'' AS VARCHAR(50)) source')