maorp
01-31-2008, 08:03 AM
I am trying to build a sql querry, which will connect materials consumed in a batch (which are themselves creted in a batch) with the batch that created them.
currently I'm connecting IC_TRNS_PND material line (Doc_id=a,line_type=-1, doc_type='PROD', lot_id=x) and It's respected IC_TRNS_PND product line (Doc_id=b, line_type=1, doc_type='PROD', lot_id=x).
this join between 2 IC_TRNS_PND tables is very costy. Is there a table which hold the relation between lot_id (as a material) and the doc_id (as a manufactured Item)?
currently I'm connecting IC_TRNS_PND material line (Doc_id=a,line_type=-1, doc_type='PROD', lot_id=x) and It's respected IC_TRNS_PND product line (Doc_id=b, line_type=1, doc_type='PROD', lot_id=x).
this join between 2 IC_TRNS_PND tables is very costy. Is there a table which hold the relation between lot_id (as a material) and the doc_id (as a manufactured Item)?