
Hi All,
I need to populate a new field via sql Which uses values from two Tables. These Include the Prod. Order Line and Prod. Order Components. I'm trying to get a "Pick Qty Outstanding" which is essentailly..
( Prod Order Line."Quantity" * Prod. Order Component."Quantity Per") - Prod. Order Component."Qty. Picked"
The new field will be on the Prod. Order Component Table.
Can anyone advise me on how to do such joins in SQL. Thanks
*This post is locked for comments
I have the same question (0)Technically you can use such a query:
update poc set [Pick Qty Outstanding]=
( pol."Quantity" * poc.[Quantity per]) - poc.[Qty_ Picked]
from [Your Company$Prod_ Order Component] poc
join [Your Company$Prod_ Order Line] pol
on pol.Status=poc.Status and pol.[Prod_ Order No_]=poc.[Prod_ Order No_]
and poc.[Prod_ Order Line No_]=pol.[Line No_]
Before running please replace "Your Company" by yours one.
But I'm not really sure that your formula makes sense...