I've trying to retrieve data from our database using SQLExecQuery.
I'm having trouble with the formula to link tables together.
So far I've tried as follows, but it doesn't work:
SQLExecQuery DB, "SELECT CLIENTS.NAME, CLIENTS.TEL_1, LEASES.START_DATE FROM ONSETC_MERGED_CLIENTS INNER JOIN ONSETC_MERGED_LEASES ON ONSETC_MERGED_CLIENTS.CLIENT_ID = ONSETC_MERGED_LEASES.CLIENT_ID WHERE LEASES.LEASE_ID = '1234'"
I'm not sure on the INNER JOIN part.
Is this the correct formula?
Any help would be much appricated.
I'm having trouble with the formula to link tables together.
So far I've tried as follows, but it doesn't work:
SQLExecQuery DB, "SELECT CLIENTS.NAME, CLIENTS.TEL_1, LEASES.START_DATE FROM ONSETC_MERGED_CLIENTS INNER JOIN ONSETC_MERGED_LEASES ON ONSETC_MERGED_CLIENTS.CLIENT_ID = ONSETC_MERGED_LEASES.CLIENT_ID WHERE LEASES.LEASE_ID = '1234'"
I'm not sure on the INNER JOIN part.
Is this the correct formula?
Any help would be much appricated.