When I try to run an insert query, I got the following error message:
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
Can anyone please help? Thanks.Hi
It is happening because you try to insert a string value which is greater
then you have declared.
CREATE TABLE #Test
(
col VARCHAR(5)
)
INSERT INTO #Test VALUES ('AAAAAA')--6 characters
" -00Eric Clapton" <a@.b.com> wrote in message
news:Oz1KFHcuFHA.2948@.TK2MSFTNGP15.phx.gbl...
> When I try to run an insert query, I got the following error message:
> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.
>
> Can anyone please help? Thanks.
>|||Hi Eric,
Thanks for the post.
For error message 8152, it usually means when the length of the value
entered by you into a char, varchar, nchar, nvarchar column is longer than
the maximum length of the column. For example, inserting 'FAQ' into a
char(2) column would result in this error.
You cou use Profiler to troubleshooting this error message. Tracing what
statement causes this.
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Showing posts with label string. Show all posts
Showing posts with label string. Show all posts
Monday, March 19, 2012
Monday, March 12, 2012
Msg 242 when converting date from string (date in 'YYYY-MM-DD hh:mm:ss.ms' format)
MS SQL Server 2000 SP4 Spanish
It doesn't accept such values into query, although it shows them in this format.
select * from values where Dt > '2006-06-26 00:00:00.000'
returns with Msg 242,...
What am I doing wrong?
You have me baffled, because it seems to convert fine for me; however, try this in case it is a locale issue:
Code Snippet
select convert (datetime, '2006-06-26 00:00:00.000' , 121)
as explicitConversion
/*
explicitConversion
-
2006-06-26 00:00:00.000
*/
|||Explicit conversion works, but I need to get MS SQL Server to accept dates in this format (ODBC)
Ok, found problem. My fault.
Actually ODBC format requires {ts 'YYYY-MM-DD hh:mms'}, not just time string.
Saturday, February 25, 2012
MSDTC message
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
PIt means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
PIt means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
MSDTC message
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
It means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
It means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
MSDTC message
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
PIt means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
PIt means it took too long for all of the participants in the transaction to
commit or rollback their piece of the transaction or to communicate such
activity. MSDTC is rolling back the changes.
This usually will come up whenever there is a service restart on one of the
participants also.
Sincerely,
Anthony Thomas
"p" <p@.discussions.microsoft.com> wrote in message
news:AEB53470-938A-4F7C-AF69-878D1FC864D3@.microsoft.com...
I have SQL 2000 running on Windows 2000 server and I several entires in the
application event view as follow:
"string message session idle timeout over tearing down the session"
What does this mean?
Thank You,
P
Subscribe to:
Posts (Atom)