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

converting varchar to numeric Expand / Collapse
Author
Message
Posted Wednesday, October 3, 2007 10:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, October 7, 2007 10:13 PM
Points: 1, Visits: 4
query for converting varchar to numeric

Post #406608
Posted Wednesday, October 3, 2007 11:45 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 1:50 AM
Points: 2,397, Visits: 3,408
Read about "CAST & CONVERT" in Books Online.



N 56°04'39.16"
E 12°55'05.25"
Post #406617
Posted Friday, October 5, 2007 7:08 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, June 4, 2009 7:17 AM
Points: 284, Visits: 133
select convert(int,VARCHAR_VALUE)

just replace VARCHAR_VALUE with the varchar value that you want to convert to an integer.



Have a good day,

Norene Malaney
Post #407327
Posted Saturday, October 6, 2007 1:25 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 7:36 AM
Points: 35,218, Visits: 31,677
b.amudhavalli (10/3/2007)
query for converting varchar to numeric


OMG!


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #407712
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse