View previous topic :: View next topic
|
Author |
Message |
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
hi,
iam writing a query to fetch the name of a customer.I have to fetch the name as First Name, Last Name.But the table contains only the Name Column which is a combination of First Name and Last Name.Is there any way to extract this data in DB2 into 2 different columns as First and Last name from the table.Please note that I do not have these details in anyother table. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You might consider writing the query to return the combination name to some host variable and then within the program decompose the combination to the individual name parts.
There are far better options for data manipulation in code rather than trying to get all of the work done in some query. |
|
Back to top |
|
|
shchan
New User
Joined: 06 Jun 2007 Posts: 58 Location: Hyderabad
|
|
|
|
Thanks dick scherrer... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
d |
|
Back to top |
|
|
|