Skip to content
Advertisement

Tag: teradata

Excluding same type of transactions within 3 seconds

For example, a table is like below Type Time Stamp Result 1 2021-06-25 14:21:00 A 1 2021-06-25 14:21:03 B 1 2021-06-25 14:21:06 C 1 2021-06-25 14:23:00 D 2 2021-06-25 14:21:02 C 2 2021-06-25 14:21:06 C 2 2021-06-25 14:21:09 D 3 2021-06-25 14:21:06 E And the result I want is as below. If there are a series of transactions with the

No more spool space in Database (Teradata)

I am a beginner in SQL and I have a problem with one of my queries on Teradata. When I run it, I get this error: “No more spool space in Database”. According to my research on the Internet, the problem would come from the fact that my query is not optimized enough, except that I don’t see how I

Break ranges into rows Teradata

I have an input like this: I would link to break each range into rows: I’m trying to get this output in TERADATA, can you guys help me? Thanks a lot. Answer Teradata’s proprietary EXPAND ON syntax is for creating time series, but can used for your task, too. Assuming TD16.20+ this can be further simplified using a time series

Joining two tables to keep selected values and nulls

I have got two tables that I need to join. The second table is used to filter the records from the first table. table1.parameter table2.parameter; table2.parameter_group The result should include all records from table1 for a certain parameter_group but also records where the parameter is null. What I have is: My question is – is this the most effective way

Advertisement