Sunday, 11 August 2013

Hardcode value of Coulmn Name and Column in select Query with Pipe delimiter

Hardcode value of Coulmn Name and Column in select Query with Pipe delimiter

I want to Hard code a column Name and its value as 'Ney York' in a select
query with Pipe delimiter. E.g. Emp table has fields as EmpId, EmpName,
Salary. I want output such as
Select EmpId ||'|'||
EmpName ||'|'||
'NewYork' as City ||'|'||
Salary
from Emp
Here I want City column in output query and its value should be 'NewYork'
for each record.
Here I am getting error as "FROM keyword not found where expected". When I
use comma instead of Pipe Delimiter I am getting result but not with Pipe.
Please advise. Thanks in advance.

No comments:

Post a Comment