Category "teradata"

facing issues in connecting to Teradata via python using teradatasql Module

Code: import teradatasql ExecutionContext = teradatasql.connect (host="xxxx", user="xxxx", password="xxx") def select(exec_context: ExecutionContext): try

Liquibase : Expected something between the "TABLE" keyword and the "IF" keyword

I am trying to run the below sql by liquibase and I am getting an error expected something between "TABLE" and the keyword "IF" keyword .This is for teradata da

Teradata SQL repeat insert statement

pretty new to teradata and trying to figure out how to repeat a simple insert statement. I have the following statement Insert into Test (Id) values ((sel max (

Show members that have a consistent doctors visit, after the first visit till the day of delivery

SELECT DISTINCT DEL.BABY_ID, DEL.MOTHER_ID, MIN(DEL.CHECK_VISIT_DATE) OVER (PARTITION BY DEL.MOTHER_ID) AS Del_FIRST_DATE, (DEL.CHECK_VISIT_DATE)

How do I combine YEAR and MONTH into a DATE?

I'm looking for an easier way to do this. My current code is written as below: CASE WHEN LENGTH(CAST (MTH AS VARCHAR(4))) = 1 THEN CAST(CAST (YR AS VARCH

Teradata: How to display LOB inline(inside the cells)

I have a Teradata table which contains LOB objects in different columns. When I do a query, it pops up window to ask where to save the LOB objects as txt files

Teradata - YEARFRAC equivalence

I am having a hard time trying to find something that would be equivalent to YEARFRAC (Excel) for Teradata. I messed around with the below, but want I want it t

Selecting values in a partition where a condition is met (Teradata SQL)

I have table that is in the following format: Number Departing Arriving Departure Time Removal Indicator 1 Miami Dallas 1 PM N 1 Chicago Dallas 3 PM Y 1 Dallas

Can I nest a select statement within an IF function in SQL?

Using Teradata.. I want to write a query that joins table 1 and table 2 on item code to the location in table 2. There are multiple locations per item code and

Teradata: IN clause in Pivot can't take data from Table

I wish to extract a few Calender Weeks from an yearly data. Once that's done, I want to pivot it, so that there is one row for each ID. We have a table DB.MY_CW

split int col in Teradata

I was trying to split int column in Teradata but its showing error *** Failure 9134 Unsupported type detected. SELECT col1,strtok(col2,0 ,1) FROM table;

How to enable TLS on Teradata Express

I have installed Teradata Vantage Express on an Azure VM according to these instructions: https://quickstarts.teradata.com/run-vantage-express-on-microsoft-azur

Target row updated by multiple source rows

UPDATE tb FROM Table1 tb, ( SELECT oreplace(data, '.', '') AS data FROM Table2 ) tb2 SET column = 'Y' WHERE tb.column1

Superset database connection with Teradata error

I am trying to connect TD with superset running in kube. This is code from my Dockerfile: USER root RUN pip install sqlalchemy-teradata RUN pip install

Teradata : Extract Date from string

There is a notation field with different number of characters. Eg Exceed Limit Fee 26-January-2020 or Account Exceed Limit Fee 05-June-2001 I want to extract

Column showing revenue increasing cumulatively, then only repeats the max value after a certain date

I'm creating a dashboard that, among other things, shows how much revenue a rep generated in their first month of joining the company. This is going to be base

A character string to numeric conversion failed while using syntax like 'OPE' =?

I try to run this query using Spring JDBC Template public static String FIND_CNC_OPE_GRAPPE_BY_FCT_ID = "SELECT " +"EXPO.COD_NA

How to create table in teradata that can be accessible by every user

I have a use case where I need to create a table with 1000 columns and encrypt each column by a different user. No granting access to every user is one way of

Teradata merge multiple records into single record

I want to merge multiple record into single record Ex: Input pdt status start_dt end_dt a Inactive 2022/02/02 2022/02/04 a Inctive 2022/02/05 2022/02/10 a Acti

Export data in parquet file in teradata

I cannot figure out a solution for exporting data from the Teradata database in a parquet format. I am using tdload and tbuild method which required tpt script