Exist Query help (1 Viewer)

ericryd

Registered User.
Local time
Today, 17:10
Joined
Jun 24, 2008
Messages
36
Hello,

I'm running in to some challenges with a query. I'll give you the cliff notes version.

I'm trying to compare accuracy from what our vendors say they are sending us to what we actually received.

I do a left join from what we received to what they sent and also some inner joins based on other fields I need to capture. This works great.

The challenge is this: We have noticed two types of defects from our vendors. One is where they do send us data on that order, and the other is where no order is sent at all through the feed. I need to exclude all of the orders that were never sent through the feed...so I only see the ones where partial orders or incorrect orders were sent.

I was thinking 2 part system....
1) My original query which works
2) A second query that runs off the first and does a join with the vendor query on the order number...that would ensure it exists. But someone mentioned this won't work due to line comparison issues?

That same person mentioned to use the exist function. Take my first query, then run an exists on its order vs the vendor order. The challenge is this is REAL slow, talking hours as there could be 200,000 lines of data to check.

Any thoughts on how I could accomplish this sooner?

Please:)
 

Users who are viewing this thread

Top Bottom