Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
I need the length of this select to be 40 long with blanks at the end after I concatenate the fields. Any ideas?select rtrim(s.lastname) + ',' + rtrim(s.frstname),
IronTiger
Starting Member
4 Posts
Posted - 2009-01-17 : 17:34:56
I believe this will work.select CAST(rtrim(s.lastname) + ',' + rtrim(s.frstname) AS CHAR(40)),
rjackman1959
Yak Posting Veteran
60 Posts
Posted - 2009-01-17 : 17:40:12
Perfect. Thank You
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2009-01-18 : 08:46:45
also
select CAST(replace(s.lastname + ',' + s.frstname,' ','') AS CHAR(40)),