Questions tagged [teradata-sql-assistant]

Teradata SQL Assistant is a Windows client software tool primarily intended to run queries against a Teradata SQL Engine (Relational DBMS). It can also be used with ODBC drivers or .NET data providers from other database vendors. Note: Teradata SQL Assistant is being deprecated by Teradata in favor of multi-platform Eclipse / Java / JDBC based Teradata Studio / Teradata Studio. Express.

360 questions
1
vote
0 answers

TPT Delimited Data Parsing error: Too many columns in row 1

I'm trying to load data througt TPT. While execution i have this kind or error : W_0_o_CSV_job[1]: TPT19134 !ERROR! Fatal data error processing file 'C:\Users\291506\Desktop\testdico.csv'. Delimited Data Parsing error: Too many columns in row…
Kair0
  • 81
  • 4
1
vote
0 answers

Using PIVOT function in Teradata SQL version 15.10.1.4

I am trying to pivot the following table to make it a single record. Example : Table name - ABC I know this can be done by case statement. But I have around millions of records for multiple item_id's , so I think using case statement would be very…
Analyst17
  • 153
  • 2
  • 11
1
vote
2 answers

Teradata query pagination - batch every 1000 records

I've this Teradata query: WITH ID(ROW_NUM) AS ( SELECT ROW_NUMBER() OVER (ORDER BY PRSN_ID) AS ROW_NUM FROM MyTable WHERE ACTIVE_IND = 'Y' GROUP BY PRSN_ID ) SELECT ROW_NUM-ROW_NUM MOD 2 AS FirstIndex, ROW_NUM-(ROW_NUM-1) MOD 2…
MoeMan
  • 31
  • 1
  • 7
1
vote
3 answers

count rows multiple columns

I want to count rows based on multiple columns and with a specific value in a column. Please check the attached table. Count the value of: ID Date Action = 'C' I tried COUNT(*) OVER (PARTITION BY ID, Date, Action = 'C') AS Count, but it didn't…
1
vote
0 answers

Teradata SQL Limit: Returning results When Limit reached

I want to run a simple query in Teradata SQL: SELECT * FROM Table SAMPLE 5; This works fine for small tables. However the Table I am querying is larger and this query would take 10+ minutes to run. I have also the same performance with using TOP 5…
dady7749
  • 105
  • 1
  • 9
1
vote
2 answers

IF ELSE statement in Teradata

I have two sql statements SQL 1 & SQL 2. Further, I want to run them as per below logic, SELECT * FROM MY_TABLE WHERE COL1 > 0; If ACTIVITY_COUNT = 0 THEN RUN SQL 1 ----- if records are present then run sql 1 ELSE RUN SQL 2 ----- if…
Mayur Mane
  • 15
  • 1
  • 7
1
vote
3 answers

Trying to do a INSERT INTO in SQL

So I have created the following table: CREATE TABLE TABLE1 ( CATEGORY varchar(255), CODE int ) And I try to run the following code: INSERT INTO TABLE1 ( CATEGORY, CODE ) VALUES ("xxxxx",1) But I get the following error: "Column xxxxx not…
klippy
  • 215
  • 3
  • 10
1
vote
2 answers

For an id if a value is ever false than it's always false SQL

I have a data set where I created a value that based on some criteria I get True/False based on some prior values. Now if my member is ever a False they need to have 1 record in which they are always False. Data is similar to below ID| Indicator 1 …
Jacob Ian
  • 571
  • 3
  • 7
  • 14
1
vote
2 answers

CASE with multiple condition - Teradata/SQL

My dataset looks like this in teradata: ╔═══════════╦══════════╦══════╗ ║ studentid ║ date ║ days ║ ╠═══════════╬══════════╬══════╣ ║ 1000 ║ 2/1/2017 ║ 25 ║ ║ 1000 ║ 3/8/2017 ║ 30 ║ ║ 1000 ║ 4/4/2017 ║ 80 ║ ║ 1000 ║…
Vinay
  • 55
  • 1
  • 6
1
vote
1 answer

Teradata ODBC connection issue: No version information available (required by ./tdxodbc64) on ubuntu

We are facing the following issue while connecting to teradata server. Driver v16.10 and ubuntu v14.04. /opt/teradata/client/16.10/bin$ ./tdxodbc64 -c SQLDriverConnect -t -S 'SERVER_IP' -u 'USERNAME' -p 'PASSWORD' ./tdxodbc64:…
1
vote
1 answer

Error in instr function in Teradata

Getting error in Teradata SQL select Instr(column_name, '|', -1) + 1 from db.table_name; Getting error as SELECT Failed. [6706] The string contains an untranslatable character. Not able to find which special character or record is making…
Ashu
  • 101
  • 5
1
vote
1 answer

Recursive script in Teradata

I have a table in Teradata, consisting of five main columns below: Old New Type_of_Old Type_of_New Change_Dt ---------------------------------------------------- A B 0 1 Date 1 B C 1 …
1
vote
1 answer

How to extract a Teradata .TPT file with UTF-8 encoding

We are currently extracting several Teradata .TPT files that we will upload to AWS S3, however the files are coming with ANSI encode I need them to come with encode UTF-8
1
vote
2 answers

Huge gap in increment value of identity column

I have created a table with an identity column. When I insert values in that table, Identity column shows huge gap of increment in between the values. Identity value jumps from 6 to 10001. This is the output ordered by Department id: Output…
1
vote
1 answer

Teradata SQL Assistant - Practice database

I'm new to Teradata SQL Assistant and I need to use it for work. I've been looking for some example database to do some practice on but is quite lost. Can somebody provide guideline and help to use a sample database available on the web?
kizunairo
  • 35
  • 5