I have the following Table definition
SSN Acct# Phone#
000-11-2222 123456 000 5551212
000-11-2222 123456 000 5551313
000-11-2222 123456 000 5551414
000-11-2222 987654 000 5551212
000-11-2222 987654 000 5551313
Question: Is there any way without writing a n RPG program to use SQL to extract the row where the phone # does not also exist for the other account.:
I.E. I need to select the data in row 3 because the phone # does not exist for account 987654. After which
I need to add a row for account 987654 with the missing Phone #.
Also, there can be more than 2 accounts per SSN with multiple phone #s that do not exist across all Accounts.
I have tried every arrow in my quiver and can not seem to create an SQL statement that comes close. Either I am missing something or I will need to write an RPG process to process the data, which I fear might be convoluted and messy.
Any help will be greatly appreciated.
thanks,
SSN Acct# Phone#
000-11-2222 123456 000 5551212
000-11-2222 123456 000 5551313
000-11-2222 123456 000 5551414
000-11-2222 987654 000 5551212
000-11-2222 987654 000 5551313
Question: Is there any way without writing a n RPG program to use SQL to extract the row where the phone # does not also exist for the other account.:
I.E. I need to select the data in row 3 because the phone # does not exist for account 987654. After which
I need to add a row for account 987654 with the missing Phone #.
Also, there can be more than 2 accounts per SSN with multiple phone #s that do not exist across all Accounts.
I have tried every arrow in my quiver and can not seem to create an SQL statement that comes close. Either I am missing something or I will need to write an RPG process to process the data, which I fear might be convoluted and messy.
Any help will be greatly appreciated.
thanks,