Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summing by location
Message
 
 
To
27/07/1999 18:59:23
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00246115
Message ID:
00247087
Views:
28
>All records from the master table that matches the conditions in the WHERE clause will appear in a SELECT-SQL with a LEFT OUTER JOIN clause.
>
>Again, can you give me the structure of your tables and some records in them? Like:
>
InvMaster.DBF
>=============
>Part# Description
>----- -----------
>001   Monitor
>002   Speakers
>
>OnHand.DBF
>==========
>Part# Quantity
>----- --------
>001   2
>

Oooky dooky:
INMAST.DBF
===============
PART# DESCRIPTION TOTAL_ONHAND  REORDER_AMT    GROUP
----- ----------- ------------  -----------    -------
0001   LED DISP.     450.00         600.00     CURRENT
0002   CIRCUIT BRD   150.00         300.00     CURRENT
0003   TRASH BAG      30.00          10.00     SUPPLIES

INONHD.DBF
===============
PART#   ONHAND   LOCATION
-----   ------   --------
0001    200.00      01
0001    250.00      02
0002    150.00      02
0003     30.00      01
There ya have it, actually, these tables are not one that I maintain, but are built and maintained by another program, but that other program won't do what we need it to do, so I'm extracting the info. I just found the TOTAL_ONHAND field in the master table yesterday(alot of fields in there). The main problem is as you can see in the INONHD.DBF sometimes we have parts that are in location 01 AND 02, but there are many cases where a part will be in only 1 location, so that means that there is an inventory of 0 in location 01; 01 is the stock room, 02 is the factory, thus parts kinda flow from 01 to 02, but we need to know when 01 is out of something. So there's my problem, how they heck to I do a SELECT but include ALL records from the INMAST and report an ONHAND of 0. Is there a better way? Share with me your wisdom oh swammi ;P
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform