[AccessD] Is this a really bad Idea in my purchase order database?

Joe Hecht jmhecht at earthlink.net
Sun Jun 5 22:23:54 CDT 2005


I have a multiple table query where one field is dept id on my POmaster
table.
 
SELECT DISTINCTROW PurchaseOrders.PurchaseOrderID, Vendors.VendorName,
Vendors.Address, Vendors.City, Vendors.State, Vendors.Zip, Vendors.Phone,
Vendors.Fax, PurchaseOrders.DateOrdered, PurchaseOrders.DateRequired,
PurchaseOrders.ShippingMethodID, Locations.LocationName,
Locations.LocationAddress, Locations.LocationCity, Locations.LocationState,
Locations.LocationZip, Locations.LocationPhone, Locations.LocationFax,
[City] & " " & [State] & " " & [Zip] AS VendaddLine3, [LocationCity] & " " &
[LocationState] & " " & [LocationZip] AS LocationAddLine3, [Shipping
Methods].ShippingMethod, PurchaseOrders.Notes, PurchaseOrders.Initails,
Locations.LocationID, PurchaseOrders.Dept
 
FROM Locations INNER JOIN ([Shipping Methods] INNER JOIN (Vendors INNER JOIN
PurchaseOrders ON Vendors.VendorID = PurchaseOrders.VendorID) ON [Shipping
Methods].ShippingMethodID = PurchaseOrders.ShippingMethodID) ON
Locations.LocationID = PurchaseOrders.LocationID
 
WHERE
(((PurchaseOrders.PurchaseOrderID)=[Forms]![PurchaseOrders]![PurchaseOrderID
]));
 
The above works properly. If I try to add the department table, I get
ambigious outer join error. I can fix that by making a second query.
 
The department is a static item. Is it really bad or wrong to store the
actual department in the table rather than the Dept ID to reduce the number
of queries and generally make the DB work better? I expect to be here till
at least midnight PST if anyone has suggestions?
 
 
 
 
 
Joe Hecht
Los Angeles CA
 



More information about the AccessD mailing list