>I have an old DBF that I'm accessing that has account numbers stored in 9 fields, "ACCT1", "ACCT2", etc.
>
>I need to select all records where any of these accounts appear in a list of accounts which is in a cursor ("TempAcctList") with one field.
>
>Is there any simpler way to select these records than the following:
>
SELECT * From OldTable ;
>where acct1 in (select * from TempAcctList) ;
>or acct2 in (select * from TempAcctList) ;
>or acct3 in (select * from TempAcctList) ;
>... etc, through all nine accounts
>I can certainly do this, but am just wondering if there's any simpler construction, or more efficient way to do this.
>
>Thanks in advance
Now THERE'S a case for normalizing and putting in a m-to-m.
But as it stands I can't see how it can be simplified.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.