Questions tagged [bteq]

17 questions
1
vote
1 answer

Teradata error message with new line character needs to be passed on as a parameter to a bat file

The below is the error message that is being thrown by Teradata when executing using a bteq script. This error message will be passed on as a parameter to another bat file where it will store this error message to the database. Here

tags and the…

Teja Goud Kandula
  • 1,462
  • 13
  • 26
1
vote
0 answers

How to place a new line via select statement in teradata?

Suppose there is string = 'Hello how are you? Are you there?' I want the string to be splitted into 2 lines, basically want to put a new line character in between, so that the export file (from bteq) captures it. o/p in export file…
pc52938
  • 11
  • 2
0
votes
0 answers

Space between each character in Teradata mLoad target table

I am loading a flat file into Teradata target table. Example flat file: Employee_ID, Employee_First_Name, Employee_Salary 1,Jay,50000 2,Sam,60000 3,Tom,70000 The result of the mload looks as such in the Teradata target table. 1 , J a y , 5 0 0 0 0…
0
votes
0 answers

Teradata BTEQ to export results with its corresponding SQL

I'm new to teradata BTEQ concepts. I was trying to run SQLs from file using BTEQ: .logon/usr,PWD .set width 300 .export report file=output.log .run = sqlfile .export reset .logoff .quit In above BTEQ, input run SQLfile would be having multiple…
0
votes
0 answers

Terdata BTEQ import csv with optional quotes

I need to import small csv files (less than 500 records) into Teradata tables. For normal csv, it works fine, however when the records contain commas or new lines characters, it needs to be enclosed by quotes. Bteq then interprets those as seperate…
orak
  • 2,399
  • 7
  • 29
  • 55
0
votes
1 answer

Teradata comparison between 2 variables inside BTEQ and choose an outcome

I need help to compare 2 variables inside Teradata BTEQ script and take a decision based on the outcome. I tried something like below: CREATE VOLATILE TABLE VT_JRNL_MAX_SNAPSHOT_DT,NO LOG,NO FALLBACK ( MAX_DATE_JRNL DATE FORMAT 'YYYY-MM-DD' ); …
0
votes
0 answers

Teradata BTEQ - Can't find, access or install it

Does Teradata Vantage and Teradata SQL Assistant come with BTEQ? If yes, how do I access it? If no, how do I install it? Thanks.
JohnnyDevv
  • 25
  • 5
0
votes
1 answer

Teradata BTEQ: disable logon prompt

When i run a teradata bteq in the CMD shell - A little logon prompt screen pops up. When i press enter the bteq runs. Is there a way to disable this popup screen? Searching the internet yields that entering a logonprompt off should solve the…
Rafael Zanzoori
  • 531
  • 1
  • 7
  • 23
0
votes
0 answers

Bteq if then condition

I have a Bteq script file which contain multiple queries like below: Bteq Quer1; Quer2_a; Quer2_b; Quer3; Quer4; .if errorcode <> 0 then .goto end_err .label end_ok .quit 0 .label end_err .quit 9 FIN exit $? Here I want to put a conditional…
Mado.h
  • 17
  • 4
0
votes
0 answers

Export column value from teradata as separate .txt files

im trying to write a code to export data present in column "task detail", and its export file name should be the same rows " task name " value eg: Task Detail task name task detail1 task name1 task detail2 task name2 the task details 1…
0
votes
0 answers

how can i download 200+ millions records from teradata using bteq?

Using below statement I am able to download 1 million records. But not getting how can i download 200+ millions records from the teradata table into pipe separated text file. Below is the code that I am currently using. .export reset .set width…
0
votes
1 answer

Teradata BTEQ Whitespace at end of every column

I am exporting to a text file from BTEQ and I am getting whitespace padding to the maximum length of each of my columns in my output text file. For example I just want customer_name and post_code columns to look like; Mr Always Teste,AB10 1AB, but…
Shuko
  • 3
  • 2
0
votes
1 answer

SET SESSION DATEFORM = ANSIDATE doesn't seem to be working in BTEQ

This is the BTEQ call I'm using: .EXPORT REPORT FILE = OUTPUT_FILE; SET SESSION DATEFORM = ANSIDATE; SELECT * FROM TABLE_NAME ; Dates keep coming up as IntegerDates YY/MM/DD Teradata 16.xx. Is this not supported by BTEQ/Unix? Update: Fred's…
access_granted
  • 1,807
  • 20
  • 25
0
votes
0 answers

Getting no output with a simple bteq code in windows powershell

Getting no output from the below code: PS C:\WINDOWS\System32> $PWD = import-Clixml -path "C:\BCBS\cred.xml"; $BTEQ ".logon dbname\username,$PWD select infokey from dbc.dbcinfo .logoff" $BTEQ| bteq ## $BTEQ .logon…
mat
  • 1
  • 1
0
votes
0 answers

Special Characters in Teradata Bteq export

I have a Teradata bteq script exporting table definitions by running show table from a linux server. My problem is the script outputs the ddl into a file with new lines (^M) in each line and random characters at the beginning of the script. I can…
1
2