Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6071529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:03:27+00:00 2026-05-23T10:03:27+00:00

I just imported a large amount of data into two tables. Let’s call them

  • 0

I just imported a large amount of data into two tables. Let’s call them shipments and returns.

When trying to do a simple join (left or inner) based on any criteria in these two tables. query looks like it tries to do a cross join or find every combination instead of what the query should be pulling.

each table has an PK id field, but there is not FK relationship between the two other than some shared field.

I’m currently just trying to related them on shipment_id.

I feel this is a simple answer. Am I missing a reference or something obvious that is causing this? Thanks!

here’s an example. This should returned under 100 rows. This instead returns hundreds of thousands.

SELECT r.*

FROM returns as r

left outer join shipments as s

on r.shipment_id = s.shipment_id

where r.date = '2011-06-20'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:03:28+00:00Added an answer on May 23, 2026 at 10:03 am

    The issue turned out to be very simple, just not readily apparent until going through all the columns. It turns out that the shipment ID was duplicated through every row as it hit the upper limit for the int datatype. This is why joins were returning every record.

    After switching the datatype to bigint and reimporting, everything worked great. Thanks all for looking into it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just imported a large amount of source code into Eclipse and basically the
Just curious, when I imported data from a spreadsheet with 519 lines into an
I've just imported a Flex component into my project. I have a theory question
I have a very large CSV file that I imported into a sqlite table.
I just imported a huge text file into a table, using the .import command.
I've just imported a bunch of data to a MySQL table and I have
I've just imported a chunk of text into a string element for a book
I imported the Stack Overflow data dump into SQL Server 2008. Some queries, especially
I just imported my posts from blogger into wordpress. In doing this, the tags
I've just imported a code file from my Netbeans project into an Eclipse project.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.