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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Concat A float and a char

Author  Topic 

medmidou
Starting Member

4 Posts

Posted - 2009-08-28 : 08:39:53
Hello

Hwo can i concat a float and a char,

in fact i have these columns, (date, answredcalls, offeredcalls)

I'm going to diplay these information with a new column, so like this :

select date, answercalls, offeredcalls, answeredcalls/offeredcalls * 100 as Ratio,,

Now i want to add the symbole % to all float information on this new column,

did i have to use to char first?? and if yes, how can i use it,,

thanks

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-08-28 : 08:42:54
If it is a display purpose, you can use it in front end application

or

select date, answercalls, offeredcalls, cast(1.0*answeredcalls/offeredcalls * 100 as varchar(5)) as Ratio from your_table

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

medmidou
Starting Member

4 Posts

Posted - 2009-08-28 : 09:10:20
thanks it works
Go to Top of Page
   

- Advertisement -