Queries with Linked Tables

  • Thread starter Thread starter PeterPfaffJCI
  • Start date Start date
P

PeterPfaffJCI

I have created two tables that are imported to an excel spread sheet which I
have linked to an Access Database. I have created a field that links both
tables and when I create a query for the two joined tables The joined table
doesn't return any information. My question centers around what am I
missing? What seems like a simple select query does not return values. My
tables both have a distinct ID number that are joined when the primary table
matches only the secondary table where the joined fields are matched.
 
I have created two tables that are imported to an excel spread sheet which I
have linked to an Access Database. I have created a field that links both
tables and when I create a query for the two joined tables The joined table
doesn't return any information. My question centers around what am I
missing? What seems like a simple select query does not return values. My
tables both have a distinct ID number that are joined when the primary table
matches only the secondary table where the joined fields are matched.

Please post the SQL view of the query. We can't fix what we can't see!
 
Please post the SQL view of the query. We can't fix what we can't see!
Just ask him to move a little... then you can look over his shoulder.
 
Her is My SQL Statement

SELECT [PO to Back Order Link Table].[Back Order ID Number], [PO to Back
Order Link Table].[Item Number], [PO to Back Order Link Table].[PO Number],
[PO to Back Order Link Table].[PO Delivery Date], [Current Purchase
Orders].PO_Number, [Current Purchase Orders].[Del Date_(User Fld 6)],
[Current Purchase Orders].Date
FROM [PO to Back Order Link Table] LEFT JOIN [Current Purchase Orders] ON
[PO to Back Order Link Table].[PO Number] = [Current Purchase
Orders].PO_Number;


Hope I moved my shoulder enough

Regards,

Pete
 
Her is My SQL Statement

SELECT [PO to Back Order Link Table].[Back Order ID Number], [PO to Back
Order Link Table].[Item Number], [PO to Back Order Link Table].[PO Number],
[PO to Back Order Link Table].[PO Delivery Date], [Current Purchase
Orders].PO_Number, [Current Purchase Orders].[Del Date_(User Fld 6)],
[Current Purchase Orders].Date
FROM [PO to Back Order Link Table] LEFT JOIN [Current Purchase Orders] ON
[PO to Back Order Link Table].[PO Number] = [Current Purchase
Orders].PO_Number;


Hope I moved my shoulder enough

That's fine... hope I didn't tickle when I was trying to get past...

This should return all records in [PO to Back Order Link Table], regardless of
what's in [Current Purchase Orders]; if there are any records in Current
Purchase Orders with the same PO Number, you'll see the data for those
records, otherwise NULL. Does it not do so? What's in the backorder link table
if you open it by itself?

I.e., what is there; what did you expect to see; and what did you see instead?

Do note that you can get wierd results if you include some special characters
such as parentheses in fieldnames. I'd avoid it; in fact I don't use
fieldnames containing blanks either, just A-Z0-9_.
 
John W. Vinson said:
Please post the SQL view of the query. We can't fix what we can't see!

SELECT [PO to Back Order Link Table].[Back Order ID Number], [PO to Back
Order Link Table].[Item Number], [PO to Back Order Link Table].[PO Number],
[PO to Back Order Link Table].[PO Delivery Date], [Current Purchase
Orders].PO_Number, [Current Purchase Orders].[Del Date_(User Fld 6)],
[Current Purchase Orders].Date
FROM [PO to Back Order Link Table] LEFT JOIN [Current Purchase Orders] ON
[PO to Back Order Link Table].[PO Number] = [Current Purchase
Orders].PO_Number;


Hope I moved my shoulder enough

That's fine... hope I didn't tickle when I was trying to get past...

This should return all records in [PO to Back Order Link Table], regardless of
what's in [Current Purchase Orders]; if there are any records in Current
Purchase Orders with the same PO Number, you'll see the data for those
records, otherwise NULL. Does it not do so? What's in the backorder link table
if you open it by itself?

I.e., what is there; what did you expect to see; and what did you see instead?

Do note that you can get wierd results if you include some special characters
such as parentheses in fieldnames. I'd avoid it; in fact I don't use
fieldnames containing blanks either, just A-Z0-9_.
--

John W. Vinson JVinson *at* Wysard Of Info *dot* com
--

John W. Vinson [MVP]
.
I get all of the records in the PO to Back order table to fill where I ask for that information in the query. I do not get any information when I use info from the Current PO Table. I was hoping to compare the date in the PO to Back order Table (fixed by the user) to the date in the Current PO Table (info gained form the linked table) to see if there was any differences in the date.

Regards,

Pete
 
Back
Top