Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Resident Load from 2 tables

I am trying to create a field using 2 tables that aren't joined together. Is it possible to do a resident load from 2 tables at once?

Example:

Items:

     Item_ID,

     Item_desc,

     Inv_Org_Id,

     Onhand_qty

From

items.qvd (qvd);

Orders:

     Order_ID,

     Order_Desc,

     Inv_Org_Id,

     Open_quantity

From

orders.qvd (qvd);

This is the field I want to create using fields from both tables:

if(sum(ONHAND_QTY)- sum (OPEN_QUANTITY)<=-0.1,'No stock','-') AS StockAmount

1 Reply
vishalgoud
Creator III
Creator III

not sure on the above possibility but with join you can achive i think.

Items_orders:

     Item_ID,

     Item_desc,

     Inv_Org_Id,

     Onhand_qty

From

items.qvd (qvd);

join

Orders:

     Order_ID,

     Order_Desc,

     Inv_Org_Id,

     Open_quantity

From

orders.qvd (qvd);

resident:

load if(sum(ONHAND_QTY)- sum (OPEN_QUANTITY)<=-0.1,'No stock','-') AS StockAmount,

Onhand_qty,

Open_quantity

from resident Items_orders;