SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Numbers


Numbers

Author
Message
Stuart Davies
Stuart Davies
SSCertifiable
SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)SSCertifiable (5.8K reputation)

Group: General Forum Members
Points: 5847 Visits: 4743
Comments posted to this topic are about the item Numbers

-------------------------------Posting Data Etiquette - Jeff Moden Smart way to ask a questionThere are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan I would never join a club that would allow me as a member - Groucho Marx
bitbucket-25253
bitbucket-25253
SSCrazy Eights
SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)SSCrazy Eights (9.6K reputation)

Group: General Forum Members
Points: 9621 Visits: 25280
Thank goodness for Jeff Moden's writing in the series of articles called "SPACKLE"

Speakiing of thos short but SO INFORMATIVE ARTICLES, what happend to the entry in the left most frame linking to that series of articles?

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
SQLRNNR
SQLRNNR
SSC-Forever
SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)SSC-Forever (41K reputation)

Group: General Forum Members
Points: 41187 Visits: 18565
It's nice to be reminded of these things. I think I would prefer to not have the implied conversions though.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

M&M
M&M
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4197 Visits: 3911
Good question but I couldn't find pound symbol on my keyboard.

M&M
Stewart "Arturius" Campbell
Stewart "Arturius" Campbell
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11192 Visits: 7327
Interesting question, thanks

mohammed moinudheen (1/4/2012)
Good question but I couldn't find pound symbol on my keyboard.


use ALT+156

____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Hugo Kornelis
Hugo Kornelis
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13325 Visits: 12184
Thanks for the question, Stuart!

To expand a bit on the explanation, ISNUMERIC determines if a string value can be converted to a numeric data type - any numeric data type. But it does not specify which data type the expression can be converted to.

The dollar and pound sign are valid in conversion from string to money or smallmoney (normally followed by the actual amount); the dot is valid in conversion from string to any non-integer data type (normally preceded by the whole part and followed by the fractional part). Without the numbers, the conversion will result, as Stuart already wrote, in the value zero.


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
sharath.chalamgari
sharath.chalamgari
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1650 Visits: 798
Good Question...
SqlMel
SqlMel
SSC Eights!
SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)SSC Eights! (888 reputation)

Group: General Forum Members
Points: 888 Visits: 476
Got me there with the '.' Satisfied

---------------
Mel. Cool
Tom Thomson
Tom Thomson
SSCoach
SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)SSCoach (17K reputation)

Group: General Forum Members
Points: 17726 Visits: 12338
Good question.

But I don't like the wording of the first sentence of the explanation: "...an expression is a valid numeric type"; well, 1 is not a valid numeric type, it's a numeric literal representing a value (or values, if your version of type theory doesn't allow types which overlap) belonging to several numeric types. And '$' is not a valid numeric type, it's a string literal which can be used to represent a value of the money (or smallmoney) type; and so on.

I almost fell over on '#', thinking something like "surely SQL has an octal form for integer literals, does it begin with a #"; but then I noticed that all 1s wasn't an option, which, since all the others clearly are numeric, forced me to remember that SQL is a bit more modern than my early days in computing.

Those days of course were right back when many machines didn't use the 8 bit bytes for which hexadecimal is a sensible form, octal was widely used for machines with 6 bit characters and 24-bit or 36-bit words and often indicated by # and there were various 6-bit character codes which existed alongside alongside the machines using various 8 bit character codes and 16 bit and 32 bit words which used hex. Even 5-bit characters were often used in data comms (because telex was based on them so there were async modems which had 5 data bits per character hardwired) although I never came across a machine where the wordlength was a multiple of 5 or base 32 numeric string literals were used.

Tom

Rich Weissler
Rich Weissler
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2101 Visits: 954
bitbucket-25253 (1/3/2012)
Thank goodness for Jeff Moden's writing in the series of articles called "SPACKLE"

To perhaps save someone a few minutes of searching, a link... thank you very much for mentioning the article series!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search