Assuming that there is only one record per item code in each table....How about something like
SELECT * FROM myStockTableA;
UNION;
SELECT * FROM myStockTableB;
INTO CURSOR curTemp
SELECT itemCode FROM curTemp GROUP BY itemCode HAVING COUNT(*) > 1
This should get you a list of all item codes where there is some difference in the two tables.
This is what first came to mind for me. I have no idea how efficient this is on large tables, and wouldn't be surprised to find a better method suggested by someone else.
>Hi,
>
> I would like to compare two table. Those table will have same table structure that's their field and field type is totally same.
> Let said these two table is mystocktableA and mystocktableB, there will has a field ItemCode and both itemcode will have same value. Now, i want to do a table compare, by use their same itemcode, find out the rest fields which was not same. Since the table have 50 fields instead of use "And" to compare those fields, is it got another way to do ?
> Thanks.
>
>chang