![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 01 Dec 2009 @ 15:35:01 GMT
Hi, I want to 1. Export a file using bteq 2. Should be in a position to view that exported file (hence using FILE/REPORT FILE option). 3. Import the same using bteq The following fails inserting junk data.
Tab1,tab2 are tables with 2 columns (col1 integer,col2 integer).
If I use datafile instead of file(vartext) the script runs without any errors. But in that case I will not be able to view the exported file hence trying with FILE/REPORT FILE. Anybody can suggest what is the problem ?
"b1.sh"
.logon
.Set Echoreq off
.Set Titledashes off
.Set Separator '|' ALL
.Set Format off
.set titledashes off;
.OS rm data1.txt
.export FILE=data1.txt
select col1(title ''),col2(title '') from gautars.tp1; .export reset .quit;
.logon.import VARTEXT '|' file=data1.txt .quiet on .REPEAT * using(a int, b int) insert
into gautars.tp2(col1,col2) values (:a,:b); .quit;
Thanks, Rahul
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||