October 10, 2013 at 10:03 pm
Comments posted to this topic are about the item Field Lengths
October 10, 2013 at 10:27 pm
Easy one. Thanks.
October 10, 2013 at 10:50 pm
easy one, very easy point.....
And, these kind of QOTD are already been posted...... 🙂
October 10, 2013 at 10:54 pm
ksatpute123 (10/10/2013)
Easy one. Thanks.
+1
October 10, 2013 at 11:59 pm
Easy one for Friday. Thanks
Hope this helps...
Ford Fairlane
Rock and Roll Detective
October 11, 2013 at 12:38 am
Nice question. I always mix up DATALENGTH and LEN.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 11, 2013 at 1:08 am
DATALENGTH provides exact length of the field if it is fixed length. If the field is of variable length, it returns the length of the data in the field
It's not quite true. A variable of type CHAR is padded with blanks, so DATALENGTH returns the numbers of BYTES occupied by data with trailing SPACES.
If you use NCHAR(10), e.g., DATALENGTH returns 20, because data take 20 bytes of storage.
October 11, 2013 at 1:10 am
Simple question, but wonder why the question was not just focused on column d and e and DATALENGTH and LEN.
October 11, 2013 at 1:28 am
This was removed by the editor as SPAM
October 11, 2013 at 1:29 am
+1 thanks....
Manik
You cannot get to the top by sitting on your bottom.
October 11, 2013 at 1:44 am
Nice question Steve. 🙂
TGIF... Cheers... :satisfied:
October 11, 2013 at 4:05 am
I wonder what was the thinking behind the third answer?
Why would someone think '10' will be returned if you entered '40' at the insert?
Maybe I was just clever to read from the back 😛
October 11, 2013 at 5:37 am
Carlo
You are correct in your statement. However, just wanted to give an easy overview explanation to the answer. I could have gone "real deep" in the explanation, but I thought not too.
Again, thanks for the follow up 😉
October 11, 2013 at 5:41 am
All:
Thank you for your responses. I thought an easy one for Friday would be fun and since a lot of "DBA's" (logical\physical\both) have issues with data\field storage, this would be a nice example. I just joined SQLServerCentral and I must say I have really enjoyed taking the quizzes, reading the articles, collaborating with my peers, etc. 😀
Again, happy Friday to all and expect more from me.
Regards,
Steve
October 11, 2013 at 7:35 am
+1
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply