Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 More fun with ISNUMERIC() Rate Topic Display Mode Topic Options
Author
 Message
 Posted Saturday, July 03, 2010 2:25 PM
 SSC Eights! Group: General Forum Members Last Login: 2 days ago @ 5:51 AM Points: 803, Visits: 820
 Comments posted to this topic are about the item More fun with ISNUMERIC() -----a haiku...NULL is not zeroNULL is not an empty stringNULL is the unknown
Post #947263
 Posted Sunday, July 04, 2010 3:46 AM
 Ten Centuries Group: General Forum Members Last Login: Tuesday, March 04, 2014 3:01 AM Points: 1,365, Visits: 1,746
 Hello!For those who are interested in an official documentation on this behaviour, refer BOL at: http://msdn.microsoft.com/en-us/library/ms186272.aspxThank-you! Thanks & Regards,Nakul Vachhrajani.http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspxBe courteous. Drive responsibly.Follow me on Twitter: @nakulv_sqlGoogle Plus: +Nakul
Post #947306
 Posted Monday, July 05, 2010 12:15 AM
 SSCrazy Group: General Forum Members Last Login: Monday, March 03, 2014 12:21 AM Points: 2,100, Visits: 306
 Doesn't explain why chr(13) is numeric... what function. Nice question.
Post #947383
 Posted Monday, July 05, 2010 12:25 AM
 SSC Journeyman Group: General Forum Members Last Login: Monday, February 17, 2014 4:57 AM Points: 77, Visits: 35
 My Count is only 20 (while right answer is 21)! Here is text result of the query from Question:`Count String----------- -----------20 (9), (10), (11), (12), (13), \$(36), +(43), ,(44), -(45), .(46), 0(48), 1(49), 2(50), 3(51), 4(52), 5(53), 6(54), 7(55), 8(56), 9(57), `(1 row(s) affected)
Post #947384
 Posted Monday, July 05, 2010 2:35 AM
 SSCommitted Group: General Forum Members Last Login: Today @ 11:23 AM Points: 1,632, Visits: 5,904
 I've just changed my Regional Settings to French, so the thousands seperator is a space. But even now, IsNumeric('1 234') returns 0.I knew there was a good reason that I avoid this function!
Post #947406
 Posted Monday, July 05, 2010 3:30 AM
 UDP Broadcaster Group: General Forum Members Last Login: Today @ 9:51 AM Points: 1,493, Visits: 5,044
 I was expecting an answer of 14 (numbers 0-9, +, -, . and \$), but of course that wasn't an option, so I had to go and run the script to find out where I was wrong. I can see why , counts as numeric, but some of the other values that count as such are a bit baffling--characters 9, 11, and 12, for instance!
Post #947434
 Posted Monday, July 05, 2010 5:20 AM
 Hall of Fame Group: General Forum Members Last Login: Tuesday, February 11, 2014 4:35 AM Points: 3,352, Visits: 1,475
 savosin_sergey (7/5/2010)My Count is only 20 (while right answer is 21)! Here is text result of the query from Question:`Count String----------- -----------20 (9), (10), (11), (12), (13), \$(36), +(43), ,(44), -(45), .(46), 0(48), 1(49), 2(50), 3(51), 4(52), 5(53), 6(54), 7(55), 8(56), 9(57), `(1 row(s) affected)Looks like a compatibility level issue. If you set the database to SQL Server 2000 compatibility mode, you lose the backslash character (92) from the list. Something to do with it being a valid currency character only in Japan/Korea for SQL 2000 but for all countries in SQL 2005-8.See about half way down this pageDuncan
Post #947471
 Posted Monday, July 05, 2010 5:22 AM
 Hall of Fame Group: General Forum Members Last Login: Tuesday, February 11, 2014 4:35 AM Points: 3,352, Visits: 1,475
 Great question by the way, thanks!Duncan
Post #947472
 Posted Monday, July 05, 2010 7:53 AM
 SSC Veteran Group: General Forum Members Last Login: Monday, July 22, 2013 1:05 AM Points: 248, Visits: 373
 This query returns count as 20 when executing against "master" DB (excluding '\' ASCII character number 92) and returns 21 when executing with other databases. KSB-----------------------------Thousands of candles can be lit from a single candle, and the life of the candle will not be shortened. Knowledge and happiness never decreases by being shared.” - Buddha
Post #947520
 Posted Monday, July 05, 2010 8:13 AM
 Hall of Fame Group: General Forum Members Last Login: Tuesday, February 11, 2014 4:35 AM Points: 3,352, Visits: 1,475
 Kari Suresh (7/5/2010)This query returns count as 20 when executing against "master" DB (excluding '\' ASCII character number 92) and returns 21 when executing with other databases.As I mentioned above, that's almost certainly because your master database is in compatibility level 80 (SQL 2000), while your other databases are in compatibility level 90 or 100 (SQL 2005 or 2008).Do check and let me know.Duncan
Post #947527

 Permissions