Link to home
Start Free TrialLog in
Avatar of Roberto Madro R.
Roberto Madro R.Flag for United States of America

asked on

oracle sqlplus query delimiter

why would I be getting the comma  ||','|| delimiter as part of the output header in my query?
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

The header defaults to your column "name".  If you don't provide an alias, Oracle uses a substring of what crated the column.
for example:
SQL> select 'Hello' || ',' || 'World' from dual;

'HELLO'||',
-----------
Hello,World

SQL> select 'Hello' || ',' || 'World' as column_alias from dual;

COLUMN_ALIA
-----------
Hello,World
Avatar of Roberto Madro R.

ASKER

Yep, I get the same thing you get.
>>Yep, I get the same thing you get.

As expected.  What are your desired results?
The desired results to only and cleanly get the designated header name, I'm for example getting the ||','|| as part of the header names, and the case statement is being displayed in whole.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
An alternative is set the column header for the alias:
col column_alias head 'col1,col2,col3'
select 'Hello' || ',' || 'World'  as column_alias from dual;

Open in new window

slightwv, your solution ID: 42056758, was what the dr. ordered, many thanks, we can file this case in the "Done" drawer.

Regards