Questions tagged [full-outer-join]

A full outer join combines the effect of applying both left and right outer joins.

Conceptually, a full outer join combines the effect of applying both left and right outer joins. Where records in the FULL OUTER JOINed tables do not match, the result set will have NULL values for every column of the table that lacks a matching row. For those records that do match, a single row will be produced in the result set (containing fields populated from both tables).

279 questions
0
votes
1 answer

Full outer join not working between two tables and multiple conditions on Oracle SQL in PL/SQL Developer

I need help with a Join NOT WORKING in PL/SQL Developer under Oracle SQL. I have a table VALUES which have multiple columns. Its structure is: CYCLE|PERIOD|FEE|CITY|SERVICE_NAME|CLIENT_TYPE|VALUE what I want to do is to add another column new to…
0
votes
2 answers

Using FULL OUTER JOIN and/or UNION to combine tables with like fields

I'm trying to create a view of two tables that have many fields in common. The fields that exist in both tables should exist under one field in the new view. I've found some posts here and another I've lost track of that suggested using UNION and…
user3633538
0
votes
2 answers

Full outer join in mysql with movie database

Hi I have the following tables and columns. movie: ID, title person: ID, name involved: personID, movieID I need to answer the question: "Which movies have either John Travolta or Uma Thurman, but not both starred in?" I couldn't figure out how…
Copperström
  • 359
  • 2
  • 6
0
votes
2 answers

Full outer join on mysql?

i have 2 tables that i want to make them full outer join. i am using the following query: select * from permissions left join user_news_permission on permissions.userID = user_news_permission.userID union select * from permissions right join…
Matin Lotfaliee
  • 1,745
  • 2
  • 21
  • 43
0
votes
0 answers

SQL Server: Full Outer Join, On vs. Where

I've searched for this and can't seem to find an answer. I apologize in advance as I'm sure this answer is out there, but I can't seem to find it. I'm working with a SQL Server 2005 DB, and I'm aware that the query below doesn't represent a…
John Tarr
  • 717
  • 1
  • 9
  • 21
0
votes
1 answer

Get result set from complex n:m-relationships in Oracle database

I try to write a SQL query (using full outer join) that creates a full result set from three tables that are related to each other by n:m-relationships. The initial situation is a normalized data model with three entities: person, artifact and…
lennard
  • 11
  • 3
0
votes
0 answers

SQL Server : FULL OUTER JOIN unusual behavior

I have 2 tables. I want to get the records from both the table using FULL OUTER JOIN while filtering out some data from one of the tables. 14026 - Total number of common records. 8428 - unique records in table 1 1512 - unique records in table…
JHS
  • 7,761
  • 2
  • 29
  • 53
0
votes
1 answer

How to find percentage difference when using a full outer join on a rec

I'd like to find an iterative way to get the percentage difference from data returned on a full outer join that allows for both current and previous values to be nulls as they may have dropped out of either result set. Allowing for the previous…
user3008705
  • 39
  • 1
  • 6
0
votes
1 answer

Multiple Full outer join on store number

I have a SQL Server query that shows each store number, sales for today vs. sales for last year. From two different tables. Now I would like to add another table that shows the store name. How can I do that? The store name is found in a table called…
Fishhead
  • 35
  • 1
  • 7
0
votes
2 answers

SQL Changing Left Join NULL Values

Is it possible to do a Full Join and have the NULL values that 'pour over' change to something else (like change all of these NULLs to 1s for instance)? The purpose would be to be able to distinguish between NULL values returned from the base table…
TJE97
  • 67
  • 1
  • 7
0
votes
1 answer

SQL Server Joining Similar Yet Dissimilar Data

I have two tables of data that I need to join into a single table. UNION ALL doesn't work because I need to have a single row (SN) with all associated info and not duplicate SNs. Examples of the two tables and the expected result are below. Any…
0
votes
1 answer

Full Outer Join with multiple tables in mysql

I am stuck in 1 query.. I want to show all products of customer as well as all sms received by system in 1 Grid/Row. I can achieve this but the thing is to display customer products only I need 3 4 other tables to join with and show all data like…
Dharmik
  • 2,325
  • 3
  • 27
  • 37
0
votes
2 answers

Number of records returned from full outer join increases as more join criteria is added

I'm full outer joining two tables. Table 1 (LEAD) has 689,189 rows and table 2 (CONTACT) has 133,318 rows, and a full outer join on them returns 738,959 rows. So far this makes sense. Each table has a field that indicates whether the record is…
Brian
  • 432
  • 1
  • 5
  • 12
0
votes
0 answers

MySQL full outer join replacement

I am writing a hockey stat database. I am trying to calculate total points for players. total points are a sum from the 1st_assists, 2nd_assists, and goals_for tables. Originally I had the below code working when I had fully populated tables (IE…
user3647071
  • 27
  • 1
  • 6
0
votes
1 answer

MySQL - Full outer join on same table using COUNT

I am trying to generate a table in the following format. Proday | 2014-04-01 | 2014-03-01 -------------------------------- 1 | 12 | 17 2 | 6 | 0 7 | 0 | 24 13 | 3 | 7 Prodays…
dandan
  • 1,016
  • 8
  • 16