Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Problem with PL/SQL and SPOOL command

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-05 : 09:50:05
Aurelien writes "Hi all,

I get a problem with a PL/SQL sample, it's working properly but I have a problem with the first and the last line of the generated text file.
Here's my sample:

SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 80
SET PAGESIZE 0
SET TERMOUT OFF
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF SPOOL OFF
SET COLSEP ','

SPOOL toto.txt
select CODECLIENT, BRANCHE, LIBELLEBRANCHE from bytl.BT_CLIENT;
SPOOL OFF

SET TERMOUT ON
SET ECHO ON
SET FEEDBACK ON
SET HEADING ON

And my result is:

select CODECLIENT, BRANCHE, LIBELLEBRANCHE from bytl.BT_CLIENT;
0104000408,PRO ,RESEAU BOUTIQ. BYTL
0104000404,PRO ,RESEAU BOUTIQ. BYTL
0104000405,PRO ,RESEAU BOUTIQ. BYTL
0104000406,PRO ,RESEAU BOUTIQ. BYTL
0104000407,PRO ,RESEAU BOUTIQ. BYTL
0104000408,PRO ,RESEAU BOUTIQ. BYTL
0104000404,PRO ,RESEAU BOUTIQ. BYTL
SPOOL OFF

Do you have an issue 'cause I don't want to have those first and last lines.

Thanks in advance,

Regards from Paris (France),

Aurelien"
   

- Advertisement -