Re: Select without blank spaces
- From: "Russell Fields" <russellfields@xxxxxxxxxx>
- Date: Mon, 15 Oct 2007 14:51:08 -0400
Hugo, Of course, your answer makes more logical sense than mine. - RLF
"Hugo Kornelis" <hugo@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:t7b7h3t6bvmmt49f6qr503c9h70744foa3@xxxxxxxxxx
On Mon, 15 Oct 2007 07:29:05 -0700, Ryan Mcbee wrote:
I am writing a query in which I want to select a field and not have the
trailing blank spaces. Here is my query: select employid, lastname + ','
+
frstname as name from upr00100
The results look like this "West ,Paul" or "Mcbee
,Ryan"
How can I get results to look like "West,Paul" or "McBee,Ryan"?
Hi Ryan,
SELECT employeeid, RTRIM(lastname) + ',' + firstname AS name
FROM upr00100;
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.
- References:
- Re: Select without blank spaces
- From: Hugo Kornelis
- Re: Select without blank spaces
- Prev by Date: Re: Select without blank spaces
- Next by Date: Aggregate rows in a Table
- Previous by thread: Re: Select without blank spaces
- Next by thread: Aggregate rows in a Table
- Index(es):
Relevant Pages
|
|