Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The (maximum) expected data length is 6, while the returned data length is

Angus JFeb 8 2012 — edited Feb 8 2012
I would like to connect the view via the OraOLEDB.Oracle' from linked server of the MSSQL and the following column couldn't be selected.

Msg 7347, Level 16, State 1, Line 2
OLE DB provider 'OraOLEDB.Oracle' for linked server 'PROD' returned data that does not match expected data length for column salary.LATEST_HIRE_DATE_STATUS'. The (maximum) expected data length is 6, while the returned data length is 4.

So I would like to change the following code from case method to decode method ? due to the view can be selected by decode method .

CASE
WHEN TRUNC (latest_hire_date) >= SYSDATE - 90
AND type_of_post = 'Temp'
THEN 'YES'
ELSE 'NO'
END
AS latest_hire_date_status,


CASE
WHEN last_day_of_duty IS NOT NULL THEN 'REJECTED'
ELSE 'PASSED'
END
AS last_day_of_duyty_status,

Edited by: user10605622 on 2012/2/8 上午 8:01
This post has been answered by Peter vd Zwan on Feb 8 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 7 2012
Added on Feb 8 2012
6 comments
4,161 views