Connecting Tech Pros Worldwide Forums | Help | Site Map

How do I append string to end of sql query results?

diesel
Guest
 
Posts: n/a
#1: Jul 20 '05
I need to append text to the end of my sql query results.

For instance, my query returns a list of user names in
firstname.lastname. I need to add @yahoo.com to each record. So the
end result should be firstname.lastname@yahoo.com. What should by
select statement look like?

Any help?

FFunky Jensen
Guest
 
Posts: n/a
#2: Jul 20 '05

re: How do I append string to end of sql query results?



"diesel" <dieselpb03@yahoo.com> skrev i en meddelelse
news:854ece22.0407131219.6f38c10a@posting.google.c om...[color=blue]
> I need to append text to the end of my sql query results.
>
> For instance, my query returns a list of user names in
> firstname.lastname. I need to add @yahoo.com to each record. So the
> end result should be firstname.lastname@yahoo.com. What should by
> select statement look like?
>
> Any help?[/color]

SELECT Firstname + '.' + Lastname + '@yahoo.com' AS Name
FROM tblPerson

easypeasy

--
Med venlig hilsen

Tom F Jensen
FFSoft
www.ffsoft.dk


David Portas
Guest
 
Posts: n/a
#3: Jul 20 '05

re: How do I append string to end of sql query results?


Maybe:

SELECT name + '@yahoo.com'
FROM YourTable

--
David Portas
SQL Server MVP
--


Closed Thread