0 - 11 of 11 tags for joins

Normally when I build a query with LEFT JOINs I have a previously mentioned table on the left side of the equal the table in the LEFT JOIN on the right side of it. In analyzing queries that a 3rd party app is executing I see something like the following:
SELECT *
FROM S1.TABLE_A ID
LEFT JOIN S1.TABLE_B B on B.ID=A.ID 
 

Hi,
I have below query which is failing in dev environment due to spool issue:
 
INSERT INTO D0_IM_RSTG_TAS_MD4.STG_TEMP_STOCK_DETAILS(MATERIAL_ID,
VALUATION_AREA_ID, PLANT_ID, STORAGE_LOCATION_ID, CUSTOMER_ID,
VENDOR_ID, WBS_ELEMENT_ID, FISCAL_PERIOD_CODE, BEGIN_DATE, END_DATE,

Hello Guru's,
 
I have few queries where in joins one of the col is Partitioned PI and other side of the join is non Partitioned PI.
I understand this is not good for query performance point of view.
What is the impact of that?
How to identify such issue from explain Plan?

Hello - 
I'm hoping someone can give a little guidance  on how to create a table that includes a "sum to date" - I believe there must be a simple way to do this but I have been unable to find a thread with this topic.
 
I am starting with a table(totals_by_date) with two columns - _date,total.
 
( like this):

Can anybody please explain how nested joins work in Teradata???
 
What I know about the other joining strategies is that
 
Merge Join : PI-PI join is on the same AMP. Hence no redistribution
                     PI -Non PI join: Non PI column redistributed temporarily in spool.

The presentation is to acquaint business users with Structured Query Language (SQL) and some interesting techniques to access their data with examples for using CASE; Subqueries and Correlated Subqueries; Types of SQL joins and how they are implemented on Teradata; facts about NULLs; Derived Table usage and other interesting optimizer information.

Background:
We have a history table which is partitioned on loadDate. This table also has another column called ProcessYearMonthNumber which is the year and month number of the loadDate. I know this can be derived on the fly but for some reason we have this as a separate column with values populated by ETL.

Hi,
I have the following tables EMPLOYEE& DEPT.
I am writing the following query :
 
validtime as of date '2001-01-01'
select *
from SANDBOX.TEMPORAL_EMPLOYEE AS EMP
join SANDBOX.TEMPORAL_DEPT as dept
on emp.dept_id=dept.dept_id;
 
 

hi All I m using V12,
Does the sequence of joins(outer) written in the query ,have any impact on the performance of the query.
I had a query with around 60 joins ,with most of them left outer joins.
Does changing the sequence of these left outer joins can improve the performance.

I've had some problems with joining to a concatenated variable and although I've fixed the problem I'd like to understand what happened here.

As background, in a transaction table we have the first digit of the account number was dropped for a couple of days and so we have a number of records where the account number needs a single digit added to the front.

We basically wanted to do a really simple query to find out how many transactions have been made on an account. However, when a join on the reconstructed account number didn't work.

The abstraction of the code is below:

Hi,

I am new to Terra Data. I have complex queries that are retrieving data from different tables and using different joins. Also, i have to apply some conditions to clean the duplicates and time period checks.