Here is my problem. I am exporting data from a legacy flat file system to text files for DTS import to a SQL 2000 server. There is a production table and a price(inventory) table. In the legacy system the price is chosen at run time based on many parameters (group, grade, species, surface, etc..) so there is no natural PK -> FK relationship. I finally got the import of all this data working perfectly but now i need to insert records into a link table to relate the production and price(inventory) tables. All (or at least the vast majority) of the production records should have a corresponding price record. When i run this join querey i get 19,000 records. It should be more like 150,000. Can anyone see anything wrong with the way i'm doing this? Did i provide all the information you would need to help, or did i leave something out? Any help greatly appreciated. Below is the koin querey.
P.S. arearec signifies what mill this production is coming from.
TIA Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
Code:
select 'prodrec'=P.rec, 'invrec'=I.rec from
Production as P
Full outer join inventory as I ON (P.grouprec = I.grouprec AND P.graderec =
I.graderec AND P.speciesrec = I.speciesrec AND P.surfacerec = I.surfacerec AND
P.moisturerec = I.moisturerec AND P.endtrimrec = I.endtrimrec AND P.xthick =
I.thickness AND P.xwidth = I.width AND P.length = I.length)
where P.arearec = 1 and I.arearec = 1
TIA Ruairi
Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.