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 no longer supported by the vendor.

528 questions
3
votes
2 answers

Teradata and sqlachemy connection

I wish to use sqlachemy with teradata dialect to push some csv into a table. So far I wrote this : import pandas as pd from sqlalchemy import create_engine user = '******' pasw = '******' host = 'FTGPRDTD' DATABASE = 'DB_FTG_SRS_DATALAB' #…
Kair0
  • 115
  • 3
  • 11
3
votes
1 answer

Df to sql to Teradata in python

I'm trying to load a csv file into a Teradata table with the df.to_sql method. So far with Teradata python modules i was able to connect, but i can't manage to load my csv file. Here is my code : import teradata import pandas as pd global…
Kair0
  • 115
  • 3
  • 11
3
votes
3 answers

Is there a way to store pandas dataframe to a Teradata table

I have created a pandas data-frame 'df' and I am trying to store it in a 'table' using Teradata-SQL assistant. Connection string - conn = pyodbc.connect( "DRIVER=Teradata;DBCNAME=tdprod;Authentication=LDAP;UID=" + username + ";PWD=" +…
Analyst17
  • 163
  • 1
  • 2
  • 13
2
votes
1 answer

Teradata SQL Split Single String into Table Rows

I have one string element, for example : "(1111, Tem1), (0000, Tem2)" and hope to generate a data table such as var1 var2 1111 Tem1 0000 Tem2 This is my code, I created the lag token and filter with odd rows element. with var_ as ( …
2
votes
1 answer

Is there a way to replace accents with Teradata SQL?

I have a varchar column and i want to replace all diacritics with normal letters For example: In: São Paulo Out: Sao Paulo In: eéíãç Out: eeiac
luisvenezian
  • 441
  • 5
  • 18
2
votes
2 answers

Teradata Concatenate multiple rows using XMLAGG getting issue in XmlAgg function or any equivalent logic to concatendate multiple rows

I have a table of record tried to concatenate multiple rows on group wise and i use XMLAGG function but when i try to run the query for particular group which has 2000 records, getting error message: Select failed 9134 : Intermediate aggregate…
vinothbabu
  • 23
  • 1
  • 3
2
votes
1 answer

how long an amount have been less than 200

I would need to determine how long amounts have been less than 200. My dataset looks like Id user time amount max_amount 25 3618 1 0 1 25 3618 1 17040 3 25 3618 1 30 2 27 4281 1 0 1 27 4281 1 14188 …
user12809368
2
votes
1 answer

How to insert Null Value in database using teradatasql on a SMALLINT, Numeric overflow occurred during computation

So I use the None object to define null values in pandas dataframe. This is an example of the row in the dataframe with the NaN and None 27 XXX None 41.0 NaN 1.0 50.0 NaN 1.0 …
Jonathan Lam
  • 1,237
  • 3
  • 20
  • 49
2
votes
1 answer

how do I create a delta query in Teradata SQL

I am using Teradata and my query is SELECT deptno, name, salary FROM personnel.employee; Above table automatically gets updated everyday e.g. new rows added/deleted, existing values gets updated. There are no date/time field. Is there a way I can…
wailer
  • 511
  • 7
  • 22
2
votes
1 answer

How to connect to Teradata database and execute a Teradata SQL query from Command line

I am curious to run a SQL-query via a .Bat script to see the "current usage" of a database. I currently run the query below via an ODBC connection in Teradata SQL Assistant. It gives me what I think is the current usage. But I would like to run from…
dady7749
  • 125
  • 3
  • 11
2
votes
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
  • 65
  • 1
  • 6
2
votes
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
user8564055
  • 23
  • 1
  • 5
2
votes
1 answer

Teradata Convert Rows to Columns (PIVOT)

I have a table like and i want that table to be converted to Using TeraData Query
Kalyan Ganta
  • 45
  • 1
  • 8
2
votes
2 answers

Teradata using CAST in a JOIN statement

I'm trying to add some fields to an existing report that runs just fine. To add these fields, I need to join to another table. The problem is the field is a different type on each table Table A / FieldA = Varchar (20) Table B / FieldB = Decimal…
Shaves
  • 884
  • 5
  • 16
  • 46
2
votes
2 answers

rows between 1 preceding and preceding 1

I am new to SQL and I want to know what exactly the function ( rows between 1 preceding and 1 preceding )do in teradata ,I want a simple clarification please ,I am trying to use this function as a testcase to get the time gaps in history table…
Amr Hassan
  • 21
  • 1
  • 1
  • 7
1
2 3
35 36