how to set the HEADER OFF

Database
Enthusiast

how to set the HEADER OFF

Hi

Please see the part of my script as below:

.set heading
.export file /root/nvfiles/create_BKP_tab1.sql
select 'create table '||trim(databasename)||'.old_'||trim(tablename)||' as '||trim(databasename)||'.'||trim(tablename)||' with data;' from dbc.tables where databasename='aa' and tablename in ('kar1','kar2','kk','kk1','kk2');
.export reset
.run file = /root/nvfiles/create_BKP_tab1.sql

i see the header in the create_bkp_tab.sql inspite of trying to set the Header off because of which scipt fails at .run file = /root/nvfiles/create_BKP_tab1.sql

Can anyone let me know how to turn the header off... ?

Thanks
TERADATA_DBA

2 REPLIES
Teradata Employee

Re: how to set the HEADER OFF

What you are seeing is probably the column title, not page heading. Specifying a blank column title should solve your issue.

.set format off
.set titledashes off
.export file /root/nvfiles/create_BKP_tab1.sql
select 'create table '||trim(databasename)||'.old_'||trim(tablename)||' as '||trim(databasename)||'.'||trim(tablename)||' with data;' (TITLE '')
from dbc.tables where databasename='aa' and tablename in ('kar1','kar2','kk','kk1','kk2');

Or leave the column title / dashes lines in the file, and just say ",SKIP=2" on the .RUN
Enthusiast

Re: how to set the HEADER OFF

Perfect.

I was able to run the script.

Thanku very much