September 10, 2013 at 10:17 pm
I got an error: "String or binary data would be truncated. The statement has been terminated."
(0 row(s) affected);-)
I Have Nine Lives You Have One Only
THINK!
September 10, 2013 at 10:30 pm
'Steppenwolf' is 11 characters long so the query will return an error!!!
September 10, 2013 at 11:14 pm
i am also note out the 0
check it it's not wrong,or you need to change the fifth one
Every rule in a world of bits and bytes, can be bend or eventually be broken
MyBlog About Common dialog control
A Visualizer for viewing SqlCommand object script [/url]
September 10, 2013 at 11:15 pm
thava (9/10/2013)
i am also note out the 0check it it's not wrong,or you need to change the fifth one
+1.
September 10, 2013 at 11:15 pm
handkot (9/10/2013)
I got an error: "String or binary data would be truncated. The statement has been terminated."(0 row(s) affected);-)
Just because of "Steppenwolf" having length 11. So insert statement is not executed successfully.
Correct answer should be "0".
:crazy:
I think, nobody check this question before post on SSC. This question is completely wrong.
Still i didn't believe that this question is posted by "Steve Jones - SSC Editor". :w00t:
Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
September 10, 2013 at 11:17 pm
Danny Ocean (9/10/2013)
handkot (9/10/2013)
I got an error: "String or binary data would be truncated. The statement has been terminated."(0 row(s) affected);-)
Just because of "Steppenwolf" having length 11. So insert statement is not executed successfully.
Correct answer should be "0".
:crazy:
I think, nobody check this question before post on SSC. This question is completely wrong.
Still i didn't believe that this question is posted by "Steve Jones - SSC Editor". :w00t:
+1
Totally agree:w00t:
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
September 10, 2013 at 11:38 pm
I think, nobody check this question before post on SSC. This question is completely wrong.
Still i didn't believe that this question is posted by "Steve Jones - SSC Editor". w00t
+1.
September 10, 2013 at 11:42 pm
Totally agreed answer should be 0 because of the length of "steppenwolf"
September 10, 2013 at 11:52 pm
CREATE TABLE
,INSERT nothing
,receive 2?
...I will never get any points... ;(
September 11, 2013 at 12:06 am
The answer is definitely wrong! I ran the exact same query on SQL Server 2008 R2 & I got the same error everyone got:
Msg 8152, Level 16, State 14, Line 3
String or binary data would be truncated.
The statement has been terminated.
(0 row(s) affected)
How come parameter mychar VARCHAR(10)
and you insert 11 char value?! 'Steppenwolf'
Of course the insert statement will fail! :w00t:
I want my point back 😉
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
September 11, 2013 at 12:14 am
asanga (9/10/2013)
CREATE TABLE,INSERT nothing
,receive 2?
...I will never get any points... ;(
Don`t worry; this question is exception! 🙂
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
September 11, 2013 at 12:17 am
Danny Ocean (9/10/2013)
handkot (9/10/2013)
I got an error: "String or binary data would be truncated. The statement has been terminated."(0 row(s) affected);-)
Just because of "Steppenwolf" having length 11. So insert statement is not executed successfully.
Correct answer should be "0".
:crazy:
I think, nobody check this question before post on SSC. This question is completely wrong.
Still i didn't believe that this question is posted by "Steve Jones - SSC Editor". :w00t:
Couldn`t agree more!
+1
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
September 11, 2013 at 12:21 am
I am really amazed of the 16 people (as of now) who got it right! :w00t:
Hope one of them will post a reply explaining how he got the result without throwing an error.
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
September 11, 2013 at 12:36 am
The question is broken...
Msg 8152, Level 16, State 14, Line 5
String or binary data would be truncated.
The statement has been terminated.
(0 row(s) affected)
Had to try it after seeing so many failed responses.
Hope this helps...
Ford Fairlane
Rock and Roll Detective
Viewing 15 posts - 1 through 15 (of 145 total)
You must be logged in to reply to this topic. Login to reply