keepingbusy
Programmer
Hi
The following SQL statement produces members records linked to a project:
Code:
Select * From MEMBERS WHERE MEMBERID In ;
(Select MEMBERID From LKPJTYP Where PROJECTURN=m.mprojnumb) ;
And ADD05 Like m.mcounty INTO TABLE tempinsert+'dbf'
I have tried assigning the Supervisors SURNAME and FORENAME to variables (m.surname and m.forename1) and changed the SQL statement:
Code:
Select * From MEMBERS WHERE MEMBERID In ;
(Select MEMBERID From LKPJTYP Where PROJECTURN=m.mprojnumb) ;
And SURNAME Like m.surname AND FORENAME1 LIKE m.forename1 ;
INTO TABLE tempinsert+'dbf'
Strange that because the SURNAME field exists in the table.SQL: Column 'SURNAME' is not found
So just to clarify:
I select a Supervisor from a list
A project is selected (e.g. FOOTBALL)
A list of members should be produced who are linked to the Supervisor (by MEMBERID) but all the linked members must be associated to the project 'FOOTBALL'
I would be grateful for some guidance on this please and if I haven't explained this enough, please let me know.
Thank you.
Lee