• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Help With SQL Select

Experts,

I'm writing a SQL select statement for a report and have a few requirements that I must meet.

I need to select from my orders table the First and Last name of the user

Table: Orders
Column: FirstName
Column: LastName

BUT I need to select them as one column in the result set, "Name". So my select would give me something like,

::Name::
FirstName + " " + LastName

Is this possible? If so, how would I form the SQL?

Thanks so much for your help!

~ C
0
clickclickbang
Asked:
clickclickbang
3 Solutions
 
answer_meCommented:
Select Isnull(FirstName,'') + '  ' + isnull(LastName,'') as '::Name::' from Orders
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
select FirstName + ' ' + LastName as Full_Name from orders
0
 
LimbeckCommented:
unless you use firebird, than it would be

select FirstName || ' ' || LastName as Full_Name from orders
0
 
clickclickbangAuthor Commented:
Thanks for the quick response, didn't know it was that easy!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now