July 17, 2012 at 8:45 am
I thought it was 20 characters and not 30 inside CAST/CONVERT.
Thanks for the straightforward and back-to-basics question.
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
July 17, 2012 at 11:20 am
An oldie but a goodie. Thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
July 17, 2012 at 6:46 pm
Toreador (7/16/2012)
I was expecting to see a 100% correct rate given that the same thing has appear a lot in QOTDs over the last few months - but currently just 60% so obviously bears repeating.The moral as always is never to rely on default precision but always specify 🙂
I have to admit I did not know the default was 30. Seems a bit arbitrary.
I never cast or convert to varchar without specifying the width, but it would certainly help to know that in debugging someone else's code so thanks for the lesson.
July 20, 2012 at 8:54 am
davoscollective (7/17/2012)
Toreador (7/16/2012)
I was expecting to see a 100% correct rate given that the same thing has appear a lot in QOTDs over the last few months - but currently just 60% so obviously bears repeating.The moral as always is never to rely on default precision but always specify 🙂
I have to admit I did not know the default was 30. Seems a bit arbitrary.
I never cast or convert to varchar without specifying the width, but it would certainly help to know that in debugging someone else's code so thanks for the lesson.
+1 (I have no memory, counting on the computer for memorizing stuff... but forget to check on the computer :hehe: )
Funny that the default in designing is 50 for the varchar, but casting it is 30!
Must be an engeneering logic: "Why make things simple when it is so simple to complicate it" :w00t:
Thanks!
July 20, 2012 at 12:15 pm
tilew-948340 (7/20/2012)
davoscollective (7/17/2012)
Toreador (7/16/2012)
I was expecting to see a 100% correct rate given that the same thing has appear a lot in QOTDs over the last few months - but currently just 60% so obviously bears repeating.The moral as always is never to rely on default precision but always specify 🙂
I have to admit I did not know the default was 30. Seems a bit arbitrary.
I never cast or convert to varchar without specifying the width, but it would certainly help to know that in debugging someone else's code so thanks for the lesson.
+1 (I have no memory, counting on the computer for memorizing stuff... but forget to check on the computer :hehe: )
Funny that the default in designing is 50 for the varchar, but casting it is 30!
Must be an engeneering logic: "Why make things simple when it is so simple to complicate it" :w00t:
Thanks!
+ another 1.
Tom
July 26, 2012 at 12:04 pm
codebyo (7/17/2012)
I thought it was 20 characters and not 30 inside CAST/CONVERT.Thanks for the straightforward and back-to-basics question.
I thought it was 50 characters. If the B alternative was 49 characters I'd wrong.
This is important in the case of development.
Thanks
August 8, 2012 at 11:55 am
Good question, tested my knowledge of basic concepts.
August 25, 2012 at 12:26 pm
ditto... did not know that 30 was the default.
Jamie
September 7, 2012 at 12:39 am
PFA
Anju Renjith
September 7, 2012 at 3:16 pm
October 22, 2012 at 10:55 pm
Basic quesion n easy to answer..+1:-D
February 3, 2013 at 11:05 pm
Jamie Longstreet-481950 (8/25/2012)
ditto... did not know that 30 was the default.
+1...
Regards,
Manik
Manik
You cannot get to the top by sitting on your bottom.
May 30, 2013 at 2:59 am
February 5, 2014 at 3:34 am
i got all option for que in sql server 2008
February 26, 2016 at 12:19 am
its working fine in SQL server 2012. so answr is ALL;-)
Viewing 15 posts - 31 through 44 (of 44 total)
You must be logged in to reply to this topic. Login to reply