Home > database >  The set of spool linesize problem
The set of spool linesize problem

Time:10-01

I under Linux to the oracle database data guide to TXT file, the spool up sqlplus method, but there's a clob fields is too big, every piece of data can be on the same line, set set linesize effective less than 80, but is greater than 80 is invalid, is this why, please comment, thank you, online etc.


Set the echo off;
Set the heading off;
The set verify off;
The set feedback off;
The set termout on;
The set linesize 10;
Set long 1000000;
The set brought none;
The set pagesize 0;
The set trimspool on;
The set trims on;

CodePudding user response:

Beg you grant instruction, the problem for two days, didn't find out why

CodePudding user response:

Their top

CodePudding user response:

Col col_name format a2000

CodePudding user response:

Thank you for your reply, upstairs but I added this statement or not

CodePudding user response:

Only 80 characters per line biggest

CodePudding user response:

Stick your process,

CodePudding user response:

Reply upstairs:

The SET brought NONE;
Set the echo off;
SET the HEADING OFF;
The SET SPACE 0;
The SET PAGESIZE 0;
The SET TRIMOUT ON;
The SET TRIMSPOOL ON;
The SET LINESIZE 32767;
SET LONG 5000;
COL PHOTO FORMAT A2000;
The set trims on;
Set the feed off;
Spool $file_idcheck;
Select id | | '${SPLIT}' | | CARDNO | | '${SPLIT}' | | CARDREST | | '${SPLIT}' | |
The NAME | | '${SPLIT}' | | NAMEREST | | '${SPLIT}' | | PHOTO | | '${SPLIT}' | | TO_CHAR (SYSDATE, 'YYYYMMDD') | | '${SPLIT}' from T_IDCHECK_RESULT t;
Spool off;
quit;

I query these fields, one of the PHOTO is CLOB type, if only select this field, you can row shows thousands of characters, or select id, PHOTO, name, write, also can row shows a complete, but if the stitching | | operators, between cannot row shows, PHOTO this field can only display 80 characters per line

CodePudding user response:

#!/bin/bash
The trap "" 0 1 2 3
Today=` date + % Y % m % d `
The SPLIT=` echo - e "\ x03 \ x04" `

File_idcheck=T_IDCHECK_RESULT. TXT

Touch "$file_idcheck
"
Idcheck=` up sqlplus -s USER/PASSWORD & lt; & lt; END
The SET brought NONE;
Set the echo off;
SET the HEADING OFF;
The SET SPACE 0;
The SET PAGESIZE 0;
The SET TRIMOUT ON;
The SET TRIMSPOOL ON;
SET LONG 32766;
The SET LINESIZE 32766;
The SET wrap on;
COL PHOTO FORMAT A32767;
The set trims on;
Set the feed off;
Spool $file_idcheck;
Select '${SPLIT}' | | PHOTO from T_IDCHECK_RESULT t;
Spool off;
quit;
END `

GBK iconv -f -t utf-8 $file_idcheck

# - to FTP to my TXTS -- -- -- -- --
FTP - I - n<& lt; !
The open IP 21
User user @ PASSWORD
CD idcheck_file
The mkdir $today
CD $today
LCD./$today
Put $file_idcheck
Bye
!
The rm $file_idcheck
The exit 0

CodePudding user response:

And solve it, meet the same problem
  • Related