469,125 Members | 1,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,125 developers. It's quick & easy.

Error when using openrowset for particular record

6
Hi,
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 2054
ck9663
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.