Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Expression in View in Enterprise Manager

Status
Not open for further replies.

bethabernathy

Programmer
Jul 13, 2001
254
0
0
MX
Hi There - I am trying to create SQL statement in Enterprise Manger where the columns are combined like:

[FirstName] & " " & [LastName] AS Expr1

It gives me the error: "invalid column name".

Is there a way to combine columns that anyone knows of? Thanks, Beth

beth@integratedresourcemgmt.com
 
Are you using Enterprise Manager or Query Analyzer ... either way, here is what you may be looking for.

SELECT RTRIM(LTRIM(FirstName)) + ' ' +
RTRIM(LTRIM(LastName)) AS 'FullName'
FROM MyTable

Of course replace MyTable w/ the table you are querying on.

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top