I'm writing a report that sends letters to selected customers. The selection was too complex to be done without a Stored Procedure (SQL 8). So far, so good.
We normally use the account address, if this exists, and otherwise the customer address. I've done this lots of times, with a 'left outer' so that accounts are shown even if they have no account address.
In this case, every account without an account address was being excluded. When I looked at the SQL, it had something called a "CROSS JOIN", which I hadn't asked for.
I found a work-round, assembling the address in SQL. But I'm still curious about why the 'left outer' wasn't accepted in this case.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10
We normally use the account address, if this exists, and otherwise the customer address. I've done this lots of times, with a 'left outer' so that accounts are shown even if they have no account address.
In this case, every account without an account address was being excluded. When I looked at the SQL, it had something called a "CROSS JOIN", which I hadn't asked for.
I found a work-round, assembling the address in SQL. But I'm still curious about why the 'left outer' wasn't accepted in this case.
Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10