472,123 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,123 software developers and data experts.

Error when using openrowset for particular record

I am executing following query
[INSERT INTO OPENROWSET('MSDASQL', 'Driver=PostgreSQL Unicode;uid=postgres;Server=localhost;port=5432;da tabase=data;pwd=XXXX',
'SELECT projectCode,projectName,projectDesc,expectedbenifi ts,AttachFileNames,lastupdated,userid
FROM Project WHERE projectCode = ''-1'' ')
SELECT projectCode,projectName,projectDesc,expectedbenifi ts,AttachFileNames,lastupdated,userid from Project where projectCode=1103]

and i am getting following error
Msg 8152, Level 16, State 10
String or binary data would be truncated.
Mar 9 '11 #1
1 2198
2,878 Expert 2GB
Just looking at the error message, it means the value you are trying to store is longer than the structure of your table.

Good Luck!!!

~~ CK
Mar 9 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by toufik toufik | last post: by
5 posts views Thread by Andrew James | last post: by
1 post views Thread by H.L Bai | last post: by
1 post views Thread by Dermot O'Loughlin | last post: by
reply views Thread by =?Utf-8?B?TG93bGFuZGVy?= | last post: by
8 posts views Thread by msnews.microsoft.com | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.