Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2008

Tip: Looking for answers? Try searching our database.

Expanding/Denormalizing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
croy - 12 Mar 2008 21:39 GMT
I'm not even sure how to title this question...

Table_1 holds values for DATE, PLACE, TYPE_ID, SIZE_ID,
SHAPE_ID, and QUANTITY.

Table_2 (lookup) holds details for SIZE.

Table_3 (lookup) holds details for SHAPE.

Table_4 (lookup) has fields for TYPE_ID, SIZE_ID, SHAPE_ID,
and WEIGHT. Only those combinations of TYPE, SIZE and SHAPE
that have been weighed are present.

Now someone wants a query to return all the fields from
Table_1, plus the WEIGHT field from Table_4.  But they want
all the Table_4 WEIGHT values to show for each record in
Table_1, displaying a QUANTITY of zero for for combinations
that are not present in Table_1.

I've run at this from so many different angles, I'm getting
wonky!

If anyone can understand my brain-fried explanation, and
cares to toss a bone, it would be much appreciated.

Signature

croy

Chris - 13 Mar 2008 19:07 GMT
You would be better off to get rid of the lookup fields and just store the ID
in Table_1.  If you do this, then you can get the data set you need by adding
Table_1 and Table_4 to a query with no joins. This gives you the Cartesian
set. You could use something like IIF(IsNull([WEIGHT]), 0, [WEIGHT]) to show
the value stored in WEIGHT or a zero.

Hope this makes sense.

> I'm not even sure how to title this question...
>
[quoted text clipped - 20 lines]
> If anyone can understand my brain-fried explanation, and
> cares to toss a bone, it would be much appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.