0 - 50 of 139 tags for bteq

Pages

Can anyone please help?
I have a source text file look like below char(10), 20K count of records,  but the output got only 8 characters and the last two got cut off (i.e. 12345678).
 
MbrID
1234567890
0123456789
 

Hi,
I have installed vmware and trying to load data from local machine to vmware datbase(TD Express) but bteq is not working in local machine due to below error

 *** CLI error: MTDP: EM_GSSINITFAIL(235): call to gss_init failed. [terasso]Cannot load TDGSS library. The TDGSS Library currently has initialization in progress already

I work for a bit company with a lot of Business Objects users. One of our most popular universes points to a Teradata environment. This universe is by far our best BI resource. It has a ton of data and it delivers it to the users lightning fast.

Any assistance would be welcomed.  I cannot seem to put the Interval in a format that Teradata likes.  The column data looks like "00 02:00:00.000000".  We are extracting it from ORacle and loading to Teradata version 15.10.  I am able to load most other data types no problem, but I cannot find the format needed to make this happy.

Hi all,
I am coding for SCD (Slowly changing Dimension) 2 in BTEQ script. What should be ideal code to avoid mess up of data considering SCD-2?
As of now, if there is an error we quit but is there any optimal solution?

Hi, i have a bteq which uses repeat function to load a file into a table. we have a parameter for the input file. if the parameter is not available, the script is failing with a Return code 0, inspite of using the label to exit if errorcode <>0.

Using tdwallet version 15.10.00.02
I can not get $tdwallet to work in any way.  The tdwallet utility works and lets me add entries and delete entries.  But, in a bteq, the value is not substituted and I get a logon error.  For ease, I created an entry u with a value of the username and p with the password. 

Good afternoon.

I'm trying to export the query result below by BTEQ. I am using the following script.

 

SELECT DATABASENAME AS "Banco de Dados"

,SUM(CURRENTPERM) AS "Ocupado"

,(MAX(CURRENTPERM) * 72) AS "Ocupado_comskew"

,SUM(MAXPERM) AS "Alocado"

,Alocado - Ocupado AS "Disponível"

Hi All,
 
I wanted to run bteq scripts located on my local mac by connecting to a remote Linux server which is used to connect to Teradata db.
How this can be any, any insights will be very helpful.
 
Thank you.
 

I have a 430 Lines of Stored procedure in a SQL file.

I have scoured the downloads section and am unable to find the installer for the Teradata Tools and Utilities 15.10 for OS X. I know it existed at some point, as I have bteq working on a MacBook Pro, I'm trying to migrate a bteq process to an iMac.

I created a file test_it.bat and test_it.txt, when I call test_it.bat from a command prompt the BTEQ script keeps stopping and asking to enter logon info and I have the logon command specified in the test_it.txt file:
test_it.bat
echo off
cd G:\COMMON\dw\Teradata_Output

Hello All,
I am trying to load a file with aroun 12 million records to an empty table and I tried using BTEQ.
I am included begin transaction & end transaction statements in my BTEQ import script.
However,  the script after sometime stating "Error 9128: Transaction exceeds max. number of Row Hash locks".

Hi,
 I am trying to export the 3 differrent select queries output to a single file (refer below)
bteq << EOB > log.txt 
.logon **********************
.export report file=result.txt
.set width 1000
.set TITLEDASHES ON;
--1st query
select metric, count(*) from tab1
-- 2nd query

Hi...
Quite new to BTEQ - but 5 years experience in SQL assistant.
Question is if there are default restrictions to "write" from BTEQ into a DB-table.
Now, in BTEQ I'm succesfull to logon and run the SQL...

Hello All,

 

I am doing a simple Select Insert through a Bteq job like below. The count is huge around 500 millions.

This warning was returned in BTEQ after executing the following query. Is there something missing with the syntax? Please note that the SESSION TRANSACTION was set to ANSI and SESSION SQLFLAG was set to ENTRY. Both were configured intentionally.

Hi,
Currently, I execute BTEQ scripts via a generated .Bat file with each script having a call to BTEQ similar to below:
bteq <Bteq\"File_1.btq" >> bteq_output.txt 2>&1

Hi ,
 
I am deleting 80 millions of records from a table , for this tpt is taking 12 hours to complete where as bteq deleting data in just 2 hours. Actually tpt should be more faster than the bteq.  Please suggest me how can i avoid this long run thrugh tpt.

Hello experts,

 

I have a problem using import and export with bteq. I have the following simple table in DB1 and DB2:

I have bteq .RUN command sandwiched by .OS calls which log the start and end date times of the .RUN. The dates are gotten by calls to UNIX 'date' command. The START date is fine, however, my COMPLETED date is always equal to my START date. I don't see how that's possible because the 'date' command is invoked fresh on the COMPLETED line.

Has anybody out there in the Teradata community tried creating a custom build system in Sublime Text (i.e. this guy did it for psql - https://www.youtube.com/watch?v=tPd4m3PLVqU)? If so, would you mind sharing your build-system code as an example? Thanks in advance!

Need to load from Table 1 to Table 2. Which utility work well here and WHY?
Please explain the limitations and advantages against each utility.

Hi,
I am new BTEQ and scripting. I am checking if my source data is updated or not before i am updating my petspace tables.
Sel 1 from SOURCE_TABLE
where cast(CMPGN_RUN_DATE as date)=current_date-1 and TRANS_DATE =current_date-1
group by 1;
.IF ACTIVITYCOUNT = 0 THEN .EXIT 99; -- 99 error code reserved for dependency

Hi,
I have set up a BTEQ of an SQL code through PUTTY.
The code runs weekly. However, I run a drop statement and then a create table statement, thus losing the table of the previous week. Is there anyway for me to create a table of the following format so that I retain all the tables that I have created ?

Hi,

Is there any BTEQ command which can be used to generate explain plan whenever I provide sql to it.
I have got around 200 sqls to analyse. Instead of fetching explaining plan one by one for each I would like to set BTEQ to generate explain plan whenever it gets a sql.
 

hello,
 
im kinda new to the tools, I got an issue running my BTEQ script with a ,CLOB column.
when I run it , I get "Teradata Database returned an invalid LOB token"
__________________

.IMPORT VARTEXT ';' LOBCOLS=1 FILE=GIS_SAMPLE.txt;

.QUIET ON

.REPEAT *

USING(

OBJECTID  VARCHAR (100),

Hello All..
Greetings of the day..
 
I have a doubt regarding connecting to multiple TD servers.
Till date I have done my works in a particular server, now I need to be involved in 2 servers. Below is the scenario, Would need little bit guidance here.
Server-1 IP: A.A.A.50   Server-2 IP: A.A.A.100

Hello,
I'm hoping there may be a way to do this.. but I'm not been able to find one so far:

Hi All,
I want a customized error output message for each statement failure in bteq. I tried with the below code but getting error
*** Error: Illegal value "MSG" specified. Notify ignored.
 
insert into target_table1 sel * from source;

Hi All,
We have a requirement to apply optimization to the exting Bteq Scripts.
What are all possible scope of optimization in a Bteq ?
Is there any best practices document or coding standard guidelines in Teradata Official documentations ?
Thanks,
Ambuj

Hi Guys,
I'm pretty new to BTEQ script. I was trying to load a table which has a date column but it's not being inserted properly.
I'm using the below code, this loads the data but the date column loads a s a float and not as a date field.

Hi,
I am a newbie in teradata and so am not familiar with casting/ formatting concepts...
can you please clarify the below queries...
1. I have an export using below syntax

Hi ,
i have extracted below two records in a file
Start_Date     End_Date
2014-01-01    2014-06-30
2014-07-01    2014-12-31
 
i am pasing this a query now
select * from tablename where Start_Date = {Start_Date}
and End_date = {End_Date}

Hello All,
 
Teradata Utilities are specialised tool for loading or exporting huge volume of data as compared to conventional SQL tools like SQL Assistant & BTEQ. I wish to learn the fundamental performance gain reason between them. I have provided my understanding on them below. I would appreciate any addition/correction to them.

Hi all,
 
I need to export data from Teradata to text files (Windows).
The first one is a .BAT file that only call the BTEQ application:
1 - bteq < file.sql
 
The second one exports the data:
2 -
.logon myhost/myuser,myuser

 

.EXPORT FILE=out.txt

select col1, col2

Hi ,
   I am facing problem when i upload  files exported using bteq into MYSQL
with .SET SESSION CHARSET set to  UTF8
 .SET NULL AS 'NULL' 
the problem mysql reads NULL as 'NULL ' so falls over
any help on this would be great.
 
Thank you

 

Hi All,
I am trying to port data from a flat file to TD via BTEQ.
The table definition is :

Hi All,
 
While inserting records into a target table from source table using Bteq utility, I faced an error message like below, thus aborting the session.
 *** Failure 3156 Request aborted by TDWM. Exception criteria exceeded:   AMP CPU Skew, AMP I/O Skew.

Hello there,
I hava a Bteq script which does some conditin checking and if the first condition met , it should invoke a powershell script for sending out emails Or exit. I am running on windows.
I am getting error on the line where I am calling the power shell script.
I have something like below:

Hi 
Can anyone please give me some thoughts  on this
I have a scenario where I need to create multiple extract files based on a column values using bteq script and in unx environment.
example 

 table abc 

 

C_Name   ID

xxxxx        1

yyyy          1

aaaaa       2

bbbbb       2

Hi,
is there any way to preserve header comments when sending a REPLACE VIEW with BTEQ?

I am executing bteqs from command prompt.
I am calling a file at the start which contains credentials (by using .RUN FILE command in the bteq).
So whenever I am running the bteqs, its throwing  " *** Warning: EOF on INPUT stream. " warning.
But the control is not coming out of bteq as its still running.
My concerns are,

Hi All
We have a requirement where we need to load one single table in parallel from different source tables.
Say, TableX needs to be loaded from TableA, TableB and TableC. They have different source data (Rows).

Hi ,

I am in badly need of some direction here :) there is an batch file(.bat) which runs an teredata query on windows, but for some reasons i will have to use Linux server from now on

current set up 

**test.bat***

 

echo off

bteq < D:\commands.txt > D:\output.txt 2>&1