Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Teachme
Starting Member
45 Posts |
Posted - 2006-09-11 : 15:47:16
|
im trying to convert char (18) data type to decimal (18,6) but it wont let me do it. It gives an arithematic error. what would be other way to solve this problem. Can i do it with float if yes how so? or any other suggested way. Thanks |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-11 : 15:48:55
|
Try decimal(24,6)How does your data look like?Peter LarssonHelsingborg, Sweden |
|
|
X002548
Not Just a Number
15586 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2006-09-12 : 09:45:28
|
Very true...but at least it would point out some issuesDECLARE @x char(10)SELECT @x = CHAR(10)SELECT ISNUMERIC(@x)SELECT @x = @x + 'Brett'SELECT ISNUMERIC(@x)SELECT @x = 'Brett'SELECT ISNUMERIC(@x)SELECT @x = @x + CHAR(10)SELECT ISNUMERIC(@x)Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
|
|
druer
Constraint Violating Yak Guru
314 Posts |
Posted - 2006-09-12 : 09:56:09
|
To be sure I follow .... basically all of our careers are being built on the foundation of a company that can't accurately produce a result to basic computer question "is this text data numeric." Oh man I better start looking for a new career.On second hand it sounds like job security. Cool we are all set for life.Hope it helps,DaltonBlessings aren't so much a matter of "if they come" but "are you noticing them." |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|