select a.inv_no, b.account_no, b.location, c.acc_name, d.part_desc ; from order_file a inner join work_history b, work_history b inner join customer_billing c, order_file a inner joing order_items d; on a.inv_no = b.inv_no into cursor sql_data>You need to explicit Join all the tables, A with B, B with C, C with D, or whatever relation you have.
>select a.inv_no, b.account_no, b.location, c.product_desc, d.acc_name ; >from order_file a inner join ship_history b, product_items c, customer_accounts d ; >on a.inv_no=b.inv_no ; >into cursor sql_data >As stated in an earlier post: >>>I am trying to get last record information from a table. This process uses two tables: 1 parent table and 1 child table. The data is going to a report.
>Parent Child >Order number Order Number Order Status >11111 11111 Submitted >11121 11111 Processing >11131 11111 Shipped > 11121 Hold > 11131 Submitted > 11131 Processing > 11131 Cancelled>>Now I am trying to add a few fields from other tables. I am trying to bring in the associated account name that is from the parent order number and I am trying to bring the product description from the product file.