macboyme95 macboyme95 - 4 months ago 13
SQL Question

SQL Fetching values with special characters

I got an Employee schema in oracle 11g.

Emp_ID,Emp_Name and SALARY.

Need to return values inserting special characters.

eg.

2**SAM**24000


Is there a way to return values w/o using INSERT statement and hence not permanently changing the table contents?

MT0 MT0
Answer

You appear to want to concatenate several columns with a '**' delimiter separating the column values:

SELECT Emp_ID || '**' || Emp_Name || '**' || Salary
FROM   Employee