Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How Create a text File from multiple tablew with specify format ?
I want to create a ascii file from multiple tables with specific format .
What is missing or is wrong in the following code and in the output file the
fields
have the original legnth from the database and not the legnth wich say the
substr ?
SET HEADING OFF;
SET PAGESIZE 0;
SET LINESIZE 201;
SET TERM ON;
SET FEEDBACK OFF;
SET SPACE 0;
SPOOL C:\CUST.TXT
SELECT ' ',
SUBSTR(CUS.tracode,1,8),
SUBSTR(LEE.LEENAME,1,50), RPAD(LEE.LEENAME,30,' '), LPAD(LEE.LEENAME,30,'_'), SUBSTR(LEE.LEEAFM,1,12), ' ', SUBSTR(LEE.txocode,1,4),' ', SUBSTR(ADR.adrstreet,1,26), ' ', SUBSTR(ADR.ADRNUMBER,1,4), ' ',
SPOOL OFF; Received on Sun Oct 24 2004 - 03:33:54 CDT