RE: Reg. Select Query to combine two fields

RE: Reg. Select Query to combine two fields

 

  

Or

select rtrim(emp_last_name) || ', ' || rtrim(emp_first_name) as emp_name
from employee


:)


-----Original Message-----
From: Divakar Goel
[mailto:db2udbdba-ezmlmshield-x26320588.[Email address protected]
Sent: Tuesday, March 27, 2007 2:05 AM
To: LazyDBA Discussion
Subject: Re: Reg. Select Query to combine two fields

Try as below:

select emp_last_name, ' ' ,emp_first_name as emp_name from employee.

Divakar





"SangeethaPriya

R. "

<db2udbdba-ezmlms
To
hield-x31257312.x "LazyDBA Discussion"

[Email Address Removed] <[Email address protected]

a.com>
cc


27/03/2007 11:04
Subject
Reg. Select Query to combine two

fields

















Hi Friends,

I am having table named as Employee in that having fields
emp_first_name,emp_last_name.
Now in select query i want to fetch like below.

if Last Name is---tiger
and first_name is - scott then
the result would be tiger scott.

My Query: select emp_last_name + " " + emp_first_name as emp_name from
employee.

But it gives error. Please suggest me for this.

Thanks in advance.

Thanks and Best Regards,
Sangeetha Priya R.




---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


DB2 & UDB email list listserv db2-l LazyDBA home page