Hi there, my question is quite simple,is there another way of adding column headers to the spooled out data below in a way that each of the headers will go into an individual column in the excel file. The way of using the "From Dual" is a bit unsatisfactory in that all the headers are in one column.
thanks a million in advance
SET PAGESIZE 0
SET ECHO off
SET FEEDBACK ON
SET LINESIZE 500
SEt TRIMSPOOL ON
SPOOL C:\Product_Migrations\EPay_with_domain_name.csv
SELECT 'COMPANY_NAME PRODUCT_ID SALES_ID CUSTOMER_ID DOMAIN_NAME TOP_DOMAIN'
FROM DUAL;
select '"'||V_VALID_LN_SALES.COMPANY_NAME||'","'||
V_VALID_LN_SALES.PRODUCT_ID||'","'||
V_VALID_LN_SALES.SALES_ID||'","'||
V_VALID_LN_SALES.CUSTOMER_ID||'","'||V_VALID_LN_SALES.DOMAIN_NAME||'","'||V_VALID_LN_SALES.TOP_DOMAIN||'"'
from V_VALID_LN_SALES
where V_VALID_LN_SALES.PRODUCT_ID = 1884;
SPOOL OFF
thanks a million in advance
SET PAGESIZE 0
SET ECHO off
SET FEEDBACK ON
SET LINESIZE 500
SEt TRIMSPOOL ON
SPOOL C:\Product_Migrations\EPay_with_domain_name.csv
SELECT 'COMPANY_NAME PRODUCT_ID SALES_ID CUSTOMER_ID DOMAIN_NAME TOP_DOMAIN'
FROM DUAL;
select '"'||V_VALID_LN_SALES.COMPANY_NAME||'","'||
V_VALID_LN_SALES.PRODUCT_ID||'","'||
V_VALID_LN_SALES.SALES_ID||'","'||
V_VALID_LN_SALES.CUSTOMER_ID||'","'||V_VALID_LN_SALES.DOMAIN_NAME||'","'||V_VALID_LN_SALES.TOP_DOMAIN||'"'
from V_VALID_LN_SALES
where V_VALID_LN_SALES.PRODUCT_ID = 1884;
SPOOL OFF