I looked through all the related questions, but not one of them does exactly what I need. I have two identically structured tables (id, VoucherNbr, BalanceInit) - one from our current production system (tableA), and the other from an inherited client system (tableB). Table A has entries a, b, c, d, e (for example), and table B has a, b, c, d, e, f, g. Table B will always have all the values โโthat exist in table A, but also have additional rows. I need to return a result set containing all the rows in table B that do not exist in table A (f and g using an example.) How can I do this?
EDIT:
TABLE A
ID | VoucherNbr | BalanceInit ============================================= 1 | 1111111111111111 | 25.00 2 | 2222222222222222 | 50.00 3 | 3333333333333333 | 10.00
TABLE B
ID | VoucherNbr | BalanceInit ============================================= 15 | 1111111111111111 | 25.00 17 | 1212121212121212 | 15.00 22 | 2222222222222222 | 50.00 34 | 3333333333333333 | 25.00 41 | 3232323232323232 | 75.00
I need to return - this is a result set containing only rows that do not exist in table A, where this value in the VoucherNbr field does not exist, and not the ID field.
ID | VoucherNbr | BalanceInit ============================================= 17 | 1212121212121212 | 15.00 41 | 3232323232323232 | 75.00
source share