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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • diesel

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

    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.lastn ame. I need to add @yahoo.com to each record. So the
    end result should be firstname.lastn ame@yahoo.com. What should by
    select statement look like?

    Any help?
  • FFunky Jensen

    #2
    Re: How do I append string to end of sql query results?


    "diesel" <dieselpb03@yah oo.com> skrev i en meddelelse
    news:854ece22.0 407131219.6f38c 10a@posting.goo gle.com...[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.lastn ame. I need to add @yahoo.com to each record. So the
    > end result should be firstname.lastn ame@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



    Comment

    • David Portas

      #3
      Re: How do I append string to end of sql query results?

      Maybe:

      SELECT name + '@yahoo.com'
      FROM YourTable

      --
      David Portas
      SQL Server MVP
      --


      Comment

      Working...