开发者

Error when using openrowset for particular record

开发者 https://www.devze.com 2023-02-15 13:07 出处:网络
INSERT INTO OPENROWSET(\'MSDASQL\', \'Driver=PostgreSQL Unicode;uid=postgres;Server=localhost;port=5432;database=data;pwd=xxx\',
INSERT INTO OPENROWSET('MSDASQL', 'Driver=PostgreSQL Unicode;uid=postgres;Server=localhost;port=5432;database=data;pwd=xxx',
    'select SanctionId,SchemeType,SchemeCode,CorrigendumStatus,AttendumStatus,yearofPlan,ReceivedDate from tesing WHERE SanctionId = ''-1'' ')
select SanctionId,SchemeType,SchemeCode,CorrigendumStatus,AttendumStatus,yearofPlan,ReceivedDate from testing where SanctionId=1103

While executing the above query, I am getting following error:

Msg 8152, Level 16, State 10, Line 1

String or binary data would be truncated. The 开发者_JS百科statement has been terminated.

Can anyone help me to resolve this?


You will have to check the source data against the target column definitions.

This happens when you try to insert, say, 100 characters into a varchar(50) column

0

精彩评论

暂无评论...
验证码 换一张
取 消