Friday, October 5, 2012

make a column in a MSSQL SELECT from more than one selected column

SELECT L.Email AS Email, L.TheOtherDatabaseUserID AS UserID, U.Email AS
   SuggestedEmail, (U.FirstName + ' ' + U.LastName) AS Username
FROM DNCMailList AS L
LEFT JOIN TheOtherDatabase..tblUsers AS U
ON L.TheOtherDatabaseUserID = U.UserID
Order By Email ASC

No comments:

Post a Comment