Roberto Madro R.
asked on
oracle sqlplus query delimiter
why would I be getting the comma ||','|| delimiter as part of the output header in my query?
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
SQL> select 'Hello' || ',' || 'World' from dual;
'HELLO'||',
-----------
Hello,World
SQL> select 'Hello' || ',' || 'World' as column_alias from dual;
COLUMN_ALIA
-----------
Hello,World
ASKER
Yep, I get the same thing you get.
>>Yep, I get the same thing you get.
As expected. What are your desired results?
As expected. What are your desired results?
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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;
ASKER
slightwv, your solution ID: 42056758, was what the dr. ordered, many thanks, we can file this case in the "Done" drawer.
Regards
Regards