0

I am using set colsep'|' in sqlplus.However,It appends the pipe(|) column-sperator in between two columns only not at the begining and the end of the column.Example-It give output like this- emp_name|emp_department|emp_salary

I want the out put like this(Append "|") in the begning and end also: |emp_name|emp_department|emp_salary| How can i acchieve this in oracle using sqlplus,Pls. help me out...ur early response can ease my nerve!!!

2
  • It may be out of purpose, but why do you need such column seprator at the beginning and at the end ? Commented Jul 2, 2009 at 9:57
  • We are doing the migration Project(migrating from sybase to Oracle) and the out in sybase is likr that and I want the same in Oracle....That's why!!! Commented Jul 2, 2009 at 11:04

2 Answers 2

4

I don't think sqlplus let you do that. As you know, separators columns are here for, well.. separe two columns. You can always do your request like that :

select '|' || col1, col2, col3, col4 || '|'
from myTable
Sign up to request clarification or add additional context in comments.

Comments

0
select
   NULL,               -- select your left most |
   your_first_column,
   another_column_1,
   another_column_2,
   your_last_column,
   NULL                -- select right mose |
 from
   your_table;

Comments