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
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
  • 81
  • 4
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
  • 153
  • 2
  • 11
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

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
  • 2
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 …
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
  • 778
  • 2
  • 13
  • 33
2
votes
2 answers

Teradata JDBC 16.20 returns wrong date in Datagrip

I am using Teradata JDBC 16.20 in Datagrip. Whenever I try to do anything with date, it returns 1 day less. For instance: SELECT date'2017-08-01' returns 2017-07-31 in Datagrip and in Teradata SQL Assistant it returns correctly 01/08/2017. Does…
VeilEclipse
  • 2,461
  • 7
  • 30
  • 49
2
votes
0 answers

Teradata 15.1 SQL Assistant - Query is invalid if starting with comment

I was testing the code of my colleague and wrote somments for each statement like this: /*Creating the list of IDs*/ Select ID from table1 Everything worked fine until I saved the Query, closed the session and then started the new one with the same…
Grigory P
  • 165
  • 5
  • 21
1
vote
1 answer

Teradata Rows to Columns (Need to Merge Doubled Row Count)

I have a query I'm running as follows - SELECT item1, item2, item3, CASE WHEN item4 = 'type A' THEN COUNT(DISTINCT field) END AS dcount_field_A, CASE WHEN item4 = 'type B' THEN COUNT(DISTINCT field) END AS dcount_field_B, FROM table GROUP…
1
vote
2 answers

How to handle repeated records in SQL?

I have a simple data set like below: Employee Data I need minimum start date & max end date of an employee whenever there is a dept id change or status code change. So i wrote this formula for Min start date- select emp id, dept id, status code ,…
1
vote
2 answers

Subtracting value in one column from the date in another column

I have tried: add_months('date_column', -'number_of_months_column') I get: error [3535] A character string failed conversion to a numeric value. Is what I am trying to do possible with the add_months option?
1
vote
1 answer

Is there a way to group rankings in SQL Teradata?

I am trying to get the ranking or grouping to count like in the custom_ranking column: I want it to count the rank like in the row custom_ranking, but everything I keep trying is counting it in the current_ranking row. I am currently using…
1
vote
3 answers

Determine closest date to another date value teradata

My dataset looks like this. For every combination of customerid,orderid and ship date, i would like to retrieve 1 process date that is less than or equal to the ship date. If the process date is greater than the ship date and no lower process date…
Vinay
  • 55
  • 1
  • 6
1
2 3
23 24