Load data in table based on value from other tables
I have a table to load. The condition to load this table is the particular column's value is not available in previously loaded tables. For example: Two previously loaded tables:
Now I want to load a final table in which I have Vendor_Trans_Id and Invoice_Id. Condition to load records in this final table is Final_table.Vendor_Trans_Id<> AR_Table.Vendor_Trans_Id and its Final_Table.Invoice_Id<>AP_Table.Invoice_Id
Re: Load data in table based on value from other tables
Ok.. I used Exists
But I see some strange result. That is, if my "final" table has duplicate rows, by Invoice_id and if this Invoice_id not present in AP_Table....the result I get is only one row and not the duplicate rows in the final table.
As per my requirement I should get both the rows if Invoice_Id is not present in AP_Table.