| |
GeekInterview.com > Interview Questions > Oracle > SQL
| Print | |
Question: Data Conversion
Answer: Have 2 table Emp1 (Column Name: Ename), 2nd table Emp2 (Column Name: First and Column Name: Last
Table Name :Emp1 EName Hunt, Michael Graham, Smith Nelson, Ryan
Table Name: Emp2 First Last Michael Hunt Smith Graham Ryan Nelson
Need to write a SQL query to convert the data from Emp1 to Emp2 in this way. Can any body help me.
Thanks
|
| July 07, 2009 09:56:03 |
#8 |
| gudluck |
Member Since: July 2009 Total Comments: 5 |
RE: Data Conversion |
SELECT CONCAT(substring_index(Ename,",",-1),substring_index(Ename,",",1)) FROM Emp1;
(Tested in mySQL) |
| |
Back To Question | |