Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

DATALENGTH Expand / Collapse
Author
Message
Posted Saturday, August 21, 2010 1:34 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 11:46 AM
Points: 870, Visits: 2,117
Comments posted to this topic are about the item DATALENGTH
Post #972995
Posted Saturday, August 21, 2010 1:45 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 5:21 AM
Points: 5,567, Visits: 24,736
Nice to be reminded of the basics - hence a good question

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #972996
Posted Monday, August 23, 2010 12:27 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 5:39 AM
Points: 13,252, Visits: 10,134
It is a good question about the basics, but not a very original one. I believe this sort of question has already been asked multiple times.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #973216
Posted Monday, August 23, 2010 4:09 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, June 30, 2014 2:51 AM
Points: 1,971, Visits: 369
good one... thanks...
Post #973309
Posted Monday, August 23, 2010 4:36 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 8:28 AM
Points: 1,206, Visits: 2,195
I would have had to give it a little more consideration if the options had included 1,3 and 3,1.
Post #973325
Posted Monday, August 23, 2010 4:47 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 12:52 AM
Points: 21,385, Visits: 9,601
da-zero (8/23/2010)
It is a good question about the basics, but not a very original one. I believe this sort of question has already been asked multiple times.


I'd say at least 10 times, and then some for a couple more gotchas. I don't mind anual review but monthly and more seems like a bit too much ofr my taste.
Post #973333
Posted Monday, August 23, 2010 7:02 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 8:41 AM
Points: 2,818, Visits: 2,553
This question proves that what I am learning on QoTD is actually sticking. Thanks.
Post #973409
Posted Monday, August 23, 2010 9:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, July 18, 2014 3:37 PM
Points: 3,123, Visits: 1,256
Interesting that this does not work the same way.

select datalength(convert(varchar, getdate(), 101))



Post #973546
Posted Monday, August 23, 2010 9:56 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, December 7, 2010 8:13 AM
Points: 436, Visits: 322
At first I thought 3,1, but since that was not an option I came to my senses and realized that varchar does not adjust if the string is too big.
Post #973569
Posted Monday, August 23, 2010 10:48 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 5:39 AM
Points: 13,252, Visits: 10,134
kevin.l.williams (8/23/2010)
Interesting that this does not work the same way.

select datalength(convert(varchar, getdate(), 101))


See http://msdn.microsoft.com/en-us/library/aa258242(v=SQL.80).aspx.

When n is not specified with the CAST function, the default length is 30.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #973620
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse