Fellow forum members, I need to build/write some BTEQ scripts to pickup data from laptop folders example e:\my_data\my_excel_file.txt and upload/create a file on our Teradata data mart. Are there any concrete examples of this BTEQ script that I can use..
I have never used BTEQ so do not send me very complex scripts, It would take me sometime to understand.. start slow and maybe in 3 mths I will be an expert LOL...
Hi Dude, since u wanna load the data from txt file, i believe it should be in delimited fmt. The following script uses ',' as field delimeter. Also, its capable of loaded 'n' number of records. Give it a try.
I have one more query here. when we import data from file everytime a record is inserted into the table a display message for executing query is shown up in spool. If i have 1000 records in input file it resutls in 1000 display's (Total elapsed time was 0.13 seconds.) Can anyone please help to suppress these display messages. Thanks in advance.
Thanks Vinay but the issue still exists. .SET ERROROUT STDOUT is helpful only when there are error messages. .REPEAT * USING emp_no (VARCHAR(6)), emp_name (VARCHAR(25)), emp_street (VARCHAR(25)), emp_city (VARCHAR(25))
INSERT INTO sarathy_db.emp values ( :emp_no, :emp_name, :emp_street, :emp_city ); Above query in mainframes with 5 records in source file results in *** Starting Row 0 at 12:32:37 on Tue Mar 27, 2007 *** Total elapsed time was 0.10 seconds. *** Total elapsed time was 0.07 seconds. *** Total elapsed time was 0.02 seconds. *** Total elapsed time was 0.03 seconds. *** Total elapsed time was 0.01 seconds. *** Warning: Out of data. *** Finished at 12:32:37 on Tue Mar 27, 2007 *** Total number of statements: 5, Accepted : 5, Rejected : 0
*** Total elapsed time was 0.25 seconds.
*** Total requests run successfully = 5 *** Successful requests per second = 20.395 In case the source file has 100 records then 100 messages corresponding to elapsed time are populated. I want only one response as *** Total elapsed time was 0.25 seconds.