in a table a column is having value like 'Steven Kovy'. without using concat() function and concatenate operator "||" how to display like 'Kovy Steven'
SELECT RPAD(SUBSTR(name,INSTR(name,' ',1)+1), LENGTH(name), SUBSTR(name,1,INSTR(name,' ',1))) FROM emp2;
Above answer was rated as good by the following members: abhi_only12000
September 23, 2007 07:38:12
Enrique
RE: in a table a column is having value like 'Steven K...
/* * In a table a column is having value like 'Steven Kovy'. without using concat() function and * concatenate operator "||" how to display like 'Kovy Steven' */ SELECT STUFF(STUFF(FirstName 1 CHARINDEX(' ' FirstName) - 1 SUBSTRING(FirstName CHARINDEX(' ' FirstName) + 1 LEN(FirstName))) LEN(FirstName) - CHARINDEX(' ' FirstName) + 2 LEN(FirstName) - CHARINDEX(' ' FirstName) SUBSTRING(FirstName 0 CHARINDEX(' ' FirstName))) As ModifiedString FROM Emp WHERE FirstName LIKE ' '
RE: in a table a column is having value like 'Steven Kovy'. without using concat() function and concatenate operator "||" how to display like 'Kovy Steven'
Assuming you had a table called s_emp2 which is nothing but the emp table from scott schema...
RE: in a table a column is having value like 'Steven Kovy'. without using concat() function and concatenate operator "||" how to display like 'Kovy Steven'
RE: in a table a column is having value like 'Steven Kovy'. without using concat() function and concatenate operator "||" how to display like 'Kovy Steven'