Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi guys.... I have a field in one of my tables of type Numeric(10, 5). I would like to convert the data into a varchar, but I want to be rid of all trailing zeros. So, 123.12000 would look like 123.12, and 123.00000 would look like 123 Any ideas? Thanks, Forch
Post Follow-up to this messagetry a double conversion ie select convert(char,(conver t(money,field))) from....... "Forch" wrote: > Hi guys.... > > I have a field in one of my tables of type Numeric(10, 5). > > I would like to convert the data into a varchar, but I want to be rid of a ll > trailing zeros. So, 123.12000 would look like 123.12, and 123.00000 would > look like 123 > > Any ideas? > > Thanks, > > Forch
Post Follow-up to this messageThis will come closer. declare @t numeric(10,5) set @t = 123.00000 select convert(varchar,cast (@t as money),1) Thanks Hari ____________________ ________________ Forch Wrote: Hi guys.... I have a field in one of my tables of type Numeric(10, 5). I would like to convert the data into a varchar, but I want to be rid of all trailing zeros. So, 123.12000 would look like 123.12, and 123.00000 would look like 123 Any ideas? Thanks, Forch Sent via SreeSharp NewsReader http://www.SreeSharp.com
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread