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.
| Author |
Topic |
|
hollyquinn
Starting Member
31 Posts |
Posted - 2009-08-06 : 12:25:11
|
| Can anyone help me with adding an additional column to this SQL Statement?SELECT FullName FROM ( SELECT FullName = (LastName + ' ' + FirstName) FROM UserProfile ) sub WHERE sub.FullName = @unI want to be able to select not only FullName from UserProfile, but also the column Email. My SQL skills are not that hot. Thanks in advance. I'm really in a bind. I'm working on a web app that has to go live Saturday!!! |
|
|
lynda
Starting Member
21 Posts |
Posted - 2009-08-06 : 12:57:03
|
| Does:SELECT FullName, Email FROM(SELECTLastName + ' ' + FirstName as FullName, EmailFROM UserProfile) subWHERE sub.FullName = @unNot work? |
 |
|
|
hollyquinn
Starting Member
31 Posts |
Posted - 2009-08-06 : 13:00:50
|
quote: Originally posted by lynda Does:SELECT FullName, Email FROM(SELECTLastName + ' ' + FirstName as FullName, EmailFROM UserProfile) subWHERE sub.FullName = @unNot work?
Thank you lynda! That works great. |
 |
|
|
|
|
|