Question: I need to format column headers in the output of sql while using concat
Eg:

```
SELECT '' || to_char(sysdate,'ddmmyyyy') as DATE || ',' || ENO|| ',' || NAME|| ''  
FROM EMP;

```

would retrieve me 

> 
> ORA-00923: FROM keyword not found where expected.
> 
> 
> 

Need the output as:

```
DATE   ENO   NAME
-----------------
251013 7560  RAM
251013 7561  ROSS

```

This format works

```
SELECT to_char(sysdate,'ddmmyyyy') || ',' || ENO || ',' || NAME as "DATE,ENO,NAME" 
FROM EMP

```

but I have an issue with 

> 
> ORA-00972: identifier is too long 
> 
> 
> 

when the length of column names inside as "" exceeds 30 characters

Eg:

```
SELECT to_char(sysdate,'ddmmyyyy') || ',' || ENO || ',' || NAME ||
       ',' || EMPLOYEE_IDENTIFICATION_NUMBER as "DATE,ENO,NAME,EMPLOYEE_IDENTIFICATION_NUMBER" 
FROM EMP;

```

Answer: 
To achieve this output you have to build your query like this
`SELECT to_char(sysdate,'ddmmyyyy') || ',' || ENO || ',' || NAME as "DATE,ENO,NAME" FROM EMP`
You need to move the alias, if you really need it, at the end of the `SELECT` clause. Also the empty strings (`''`) can be removed:

```
SELECT to_char(sysdate,'ddmmyyyy') || ',' || ENO || ',' || NAME as DATE FROM EMP;

```