Rabu, 01 Februari 2012

[MS_AccessPros] Access 2010 Join question

 

I'm writing a query in Access 2010, and am having issues with a join.
It seems like it should be simple, but I'm struggling. I'm joining 2
queries to create a new query. My goal is to bring in the "Helper QTY"
data (query 2) into the "Scheduled routings" data (query 1). Here are
my "source" queries:

Query 1 (Scheduled_Routings)

Job_number Process_number

1234 1

1234 1

1234 2

Query 2 (Helper_qty)

Job_number Process_number Helper_QTY

1234 1
2

1234 2
0

Query 1 can have multiple records for each job number and process
number. Query 2 has only 1 record for each process number within the
job. I'm joining the queries by Job_number and Process_number, and am
using a "Left Join". Here's the SQL: LEFT JOIN Helper_qty ON
(Scheduled_Routings.Work_Order_ID = Helper_qty.Jobno) AND
(Scheduled_Routings.Processno = Helper_qty.processno)

I get 400 records when I run query 1 alone. After I join query 2, I get
about 600 records. There are 46 records returned when I run query 2
alone. What am I doing wrong?

Thanks,

Troy Sherven

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar