Questions tagged [teradatasql]

The Teradata SQL Driver for Python (or related drivers). For Teradata (Vantage) database questions, use the [teradata] tag instead.

The Teradata SQL Driver for Python is a DBAPI Driver that enables Python applications to connect to the Teradata Database. The Teradata SQL Driver for Python implements the PEP-249 Python Database API Specification 2.0.

It is available from PyPI or Teradata's public download site and is used by the Teradata Python Package (teradataml) and the Teradata SQL Driver Dialect for SQLAlchemy (teradatasqlalchemy) to connect to a Teradata DBMS, aka Teradata Vantage SQL Engine. This driver is also leveraged by the Vantage Modules for Jupyter and is closely related to the Teradata SQL Drivers for R and Node.js.

272 questions
1
vote
1 answer

Workaround for oreplace in Teradata exceeding limit

I’m trying to update a table using oreplace but it won’t let me do it saying it exceeds the length. I have tried breaking it into multiple oreplace statements asin the first approach, and multiple update statements as the second approach but it…
Code_Jamer
  • 913
  • 2
  • 9
  • 21
1
vote
1 answer

Identify Temporal Table in Teradata Database

Is there a SQL query which can fetch the list of all Temporal Table from Teradata Database? Is there any special Column for Temporal Tables which identifies them of which type of Temporal Table it is?
1
vote
0 answers

A character string failed conversion to a numeric value: Teradata insert

I am trying to execute the insert statement in teradata and getting the error message 'A character string failed conversion to a numeric value' INSERT INTO USS_LOAD.RX_CLAIM (RX_CLAIM_PRCSR_PRTY_ID,RX_CLAIM_PRCSR_ORGN_NM,…
1
vote
0 answers

Enforce encoding of output files with Teradata TPT Export

I am looking for options if it is somehow possible to enforce a specific encoding (ANSI/UTF8) with TPT Export for the output .dat data file. The exported data file is required to be in ANSI format, Currently the same TPT export script generate files…
Hassam
  • 103
  • 1
  • 11
1
vote
0 answers

CAST to TIMESTAMP field in Teradata

I have timestamp stored in VARCHAR field in the format Tue Jul 28 04:05:16 PDT 2020. Can I cast it to a timestamp(0) field in Teradata ?
pats4u
  • 177
  • 6
  • 18
1
vote
0 answers

Teradata stored procedure result output

How I can print var2? REPLACE PROCEDURE Name(out var2, in var1) ---some code goes here BEGIN TRANSACTION; SET var2= var1+ 5; end; REPLACE PROCEDURE Name(out var2, 5)
Bikash
  • 11
  • 1
0
votes
0 answers

Teradata SQL: Problem adding multiple rows into newly created table using CREATE MULTISET TABLE

Here is my query: DROP TABLE table_name -- Create the multiset table to store product line owner information CREATE MULTISET TABLE table_name ( Product VARCHAR(100), Owner VARCHAR(100), Email VARCHAR(100) ); -- Insert sample data into…
0
votes
0 answers

Shred multiple JSON arrays using JSON_TABLE in Terdata

I have to shred a JSON using Teradata JSON functions. Suppose I hava JSON like { "products":[{"category":"car","name":"toyota"}, {"category":"aircraft","name":"boeing"}, {"category":"fruit","name":"pear"}], …
ѕтƒ
  • 3,547
  • 10
  • 47
  • 78
0
votes
0 answers

Facing issue converting string - UNICODE to LATIN

I am trying to insert data from table A to another table B having 900+ columns, but this is failing with this error: Failure 6706 The string contains an untranslatable character. I found out function translate(Column using UNICODE_TO_LATIN) would…
Debasis
  • 21
  • 3
0
votes
0 answers

Deleting records from a table after WHERE Condition

I have a query that joins different tables does some calculations and collects the data in the following format: (same data is provided in excel format in the link below) sample data can be found here:…
User771
  • 53
  • 5
0
votes
0 answers

convert md5 hash output into integer in Teradata

is it possible to convert uuid column value to int value using MD5 or other any other hashing function in Teradata. select hash_md5("HelloWorld") ==> 68E109F0F40CA72A15E05CC22786F8E6 Expecting : select hash_md5("HelloWorld") ==> int32
0
votes
0 answers

How to sum the value of previous row with the current row value Teradata

I have a table in Teradata as below Record_id sub_id amount seq_no total_unwind 123 0830 1.00 1 ? 123 0830 3.00 2 ? 123 0830 4.00 3 ? 456 0850 2.00 1 ? 456 0850 1.00 2 ? 456 0850 5.00 3 ? I want the sum of amount in…
Janvi
  • 1
  • 2
0
votes
2 answers

Teradata help in removing the multiple values from text

Need help in achieving the output provided below.Using the below query but its not removing the duplicate values if there are multiple values coming : select databasename, tablename, CASE when LENGTH(commentstring) > 0 and (upper(CommentString)…
Sak
  • 61
  • 6
0
votes
1 answer

Zero Results in division teradata

I try to divide to decimal columns But keeps returns zeros if after casting to decimal For example A B 677.00 900.00 A/B Returns 0.000 I try to divide to decimal columns But keeps returns zeros if after casting to decimal For example A …
Ghaida
  • 19
  • 1
0
votes
0 answers

Teradataml DataFrame from_query fails with Error 3524 The user does not have CREATE VIEW access to database

For context I'm attempting to use the teradataml module in order to try and leverage the sever side speed and fastload in order to get it in to Pandas for further processing and visualisation. I can run the below query just fine by creating a…
Ka-Pow
  • 13
  • 3
1 2
3
18 19