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 2005 Forums
 Transact-SQL (2005)
 Appending Zero at the end

Author  Topic 

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2011-02-03 : 22:24:03
HI
I need to append the"0" at the end of the integer column field in select statement how do we do this in SQL server 2005 T-SQL ?

select distinct cast(Code as varchar(10) + 'x' + from datawarehouse.dbo.QMS_vwFlatArea I

Thanks,
Gangasdhar


Thanks,
Gangadhara MS
SQL Developer and DBA

sathishmangunuri
Starting Member

32 Posts

Posted - 2011-02-03 : 23:37:49
select distinct cast(code as varchar(10))+'0' from datawarehouse.dbo.QMS_vwFlatArea I


sathish
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-02-03 : 23:39:44
Since it's an integer you could just multiply it by 10.
Go to Top of Page

rekhskrishnan
Starting Member

7 Posts

Posted - 2011-02-04 : 01:46:07
select distinct Code*10 from datawarehouse.dbo.QMS_vwFlatArea I


thanks,
Rekha
Go to Top of Page
   

- Advertisement -