I have a table (Results) that contains two columns ('Acc' and 'Rec'). The Acc column can have duplicate entries.
Each Acc will either have a currency assigned or a default of 999 or both.
For example:
Acc Rec
--- ---
100 GBP
100 999
200 AUD
300 999
What I'm trying to do is write a line of SQL that deletes the entry of 999 if the Acc is duplicated, but not delete the Acc if no true currency exists.
For example Results:
Acc Rec
--- ---
100 GBP
200 AUD
300 999
Acc 100 with a default (999) was not valid as it already has a true currency of GBP.
I know this is probably very simple but it's been killing me. Any help would be much appreciated!
Rgds,
Si
jimlad
Each Acc will either have a currency assigned or a default of 999 or both.
For example:
Acc Rec
--- ---
100 GBP
100 999
200 AUD
300 999
What I'm trying to do is write a line of SQL that deletes the entry of 999 if the Acc is duplicated, but not delete the Acc if no true currency exists.
For example Results:
Acc Rec
--- ---
100 GBP
200 AUD
300 999
Acc 100 with a default (999) was not valid as it already has a true currency of GBP.
I know this is probably very simple but it's been killing me. Any help would be much appreciated!
Rgds,
Si
jimlad