Dear Experts,
I have a scenario: SQL--> IDoc.
In the SQL DB there are 3 tables:
- OrderHeader
Index (Primary-Key), OrderID, Date, CustomerID....
- OrderPostion
Index, PosID, OrderID, (Primary-Keys), ItemID, Quantity, Unit...
- StatusProtocol
Index (Primary-Key), Status, Type, SenderSys, ReceiverSys...
I'm not familiar with SQL-Query, how to select Orders from these 3 tables, it could be looked as below:
select OrderID, CustomerID, Date from OrderHeader and select PosID, ItemID, Quantity .. from OrderPostion where Index = Index and Index in (Select Index from StatusProtocol where Status=Ready, Type = Order, SenderSys = ExternApp...)
After selection the Status of the table StatusProtocol must be updated to Finished.
Could anyone give me a hand?
Hope you can understand me.
Thank u very much and Regards
Christine