Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Rdb > Problems conver...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 126 of 183
Post > Topic >>

Problems converting Real to Char

by "VitorEugenio" <vitor.eugenio@[EMAIL PROTECTED] > Aug 27, 2005 at 10:23 AM

My friends, I never worked with RDb before, but I developed a software
using Oracle 9i and now I had to use RDB... and I'm having lots of
problems.


I have a column declared as REAL and another one as Char, I need to put

them toguether in a string.


Ex.: Field - Number (REAL) Value: 100.02
Field - Mesure (char) Value: "m2"
I have to make a SELECT and return like this "100,02 m2"


When I was using oracle 9i I just put "table.number || '-' ||
table.mesure" and it was perfect... but with RDB I can't use this way,
I have to convert REAL in CHAR first, but when I do this the result is
something like that: "1.020000000E m2" completely diferent, how can I
solve this?


ps.: If I use "cast(Cast(table.number as integer) as varchar(10)) ||
'-' || table.mesure " it works but losing precision...


Please, it seems to be a stupid question.. but I never worked with this

database before and I'm very lost.... 


tnks...




 3 Posts in Topic:
Problems converting Real to Char
"VitorEugenio"   2005-08-27 10:23:40 
Re: Problems converting Real to Char
"Dr. Dweeb" <  2005-11-04 23:03:53 
Re: Problems converting Real to Char
"Richard Maher"  2005-11-05 07:58:12 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 15:47:09 CDT 2008.