The (maximum) expected data length is 6, while the returned data length is
Angus JFeb 8 2012 — edited Feb 8 2012I 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