Tags for join
LEFT JOINs and order of positions of fields in ON condition
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   
joins join
Left Outer Join Efficiency
I am experiencing efficiency issues when using multiple left out joins in queries.  I can resolve this by breaking up the existing query into smaller queries but I would like to know technical reasons why Left Outer Joins would experience efficiency issues.
left outer left join
query to bring in multiple row values into one record
My data looks something like this: table1: ID | Line | Code 1 | 1 | a 1 | 2 | b 2 | 1 | d 2 | 2 | e 2 | 3 | f   table2: Code | Name a | alpha b | beta d | delta e | epsilon f | phi   A common join brings the following results: ID | Line | Name
teradata join recursive query help
CASE is a solution?
Hello,   I have a difficult task (or at least this is how I see it) to implement using SQL. Here is the case: - there are two tables: A and E each one having a numeric column. Each of the two tables contain checkpoints(numbers) for a specific region.
case sql join
trouble in creating view....
Hi  I am trying to implement a view on tow tables  but the problem is I am not getting the result set after creating the view. I have a SOURCE tables  First source table T1 Second Source table T2.   my Requirement is  I am joining T1 with T2 on date, t2nbr,t3nbr,t4nbr,t5nbr.
trouble view join
aggregate function based on multiple rows
I am trying to perform a sum based on multiple values in a table.   The current year week is formated like this 201401 for 2014 year and week 1.
sum aggregate join
Creating index over wildcard join on volatile table creation
Hi!. I have the following query: create multiset volatile table newTable, no log as ( SELECT so.*, pu.* FROM db.table1 so left outer join db.table2 pu on so.id = pu.id ) with data primary index(id) on commit preserve rows;Which throws the following error when run:
join index volatile table
varchar join integer
Consider two tables ,one has COLUMN_A defined as a VARCHAR(100) and the other has COLUMN_A defined as an INTEGER. When joining these two tables via COLUMN_A what does the optimizer have to do in order to accomplish the join?Convert VARCHAR to INTEGER  or convert INTEGER to VARCHAR? thanks.
join varchar integer convert
Filter results from two joins
Hello, I have an issue while trying to get only the record containing max(c.event_dtm) from the following query: SEL     a.startclock_day,            a.shacct_no,            a.awb_no,            b.ship_ref,            b.lc_event_cd,            c.event_dtm,            c.gmt_event_dtm,
join filter query max
help on tuning a query
SELECT col1,col2 FROM staging_table STG INNER JOIN target_table TGT ON STG.SRC_TRAN_ID=TGT.SRC_TRAN_ID WHERE TGT.ROW_STAT_CD='Active' AND TGT.SRC_SYS='sourcename' In above query, both STG and TGT has PI as SRC_TRAN_ID TGT has stats collected on ROW_STAT_CD and SRC_SYS
tuning join non usage of parition

Pages