juandiegomc
Programmer
Hello,
I am trying to copy the child's teacher's name into his fields called dex.teachernam and dex.teacherstr. This pulls the teachers name from the same dex table but I want to pull the teachers street too. What is messing me up when I add the second part on for the teacherstr (teacherstreet) to copy or replace this steeet in the kid's teacherstr field. Foxpro keeps asking me for a comma in the second part. What is missing here?
===========================
IF lnDexID # 0
SELECT DEX
SELECT ALLT(FirstName)+' '+IIF(!EMPTY(MiddleName),ALLT(MiddleName)+' ','') +ALLT(LastName) AS FullName ;
FROM DEX ;
WHERE DEX_ID == lnDexID ;
INTO ARRAY laPerson[1]
SELECT ALLT(Street)+' ',' '+IIF(!EMPTY(Town) AS AddressName ;
FROM DEX ;
WHERE DEX_ID == lnDexID ;
INTO ARRAY laPerson[2]
SELECT Dex
IF _TALLY # 0
REPLACE TEACHERNAM WITH laPerson[1]
REPLACE TEACHERSTR WITH laPerson[2]
juandiegomcc@afirmacion.com
I am trying to copy the child's teacher's name into his fields called dex.teachernam and dex.teacherstr. This pulls the teachers name from the same dex table but I want to pull the teachers street too. What is messing me up when I add the second part on for the teacherstr (teacherstreet) to copy or replace this steeet in the kid's teacherstr field. Foxpro keeps asking me for a comma in the second part. What is missing here?
===========================
IF lnDexID # 0
SELECT DEX
SELECT ALLT(FirstName)+' '+IIF(!EMPTY(MiddleName),ALLT(MiddleName)+' ','') +ALLT(LastName) AS FullName ;
FROM DEX ;
WHERE DEX_ID == lnDexID ;
INTO ARRAY laPerson[1]
SELECT ALLT(Street)+' ',' '+IIF(!EMPTY(Town) AS AddressName ;
FROM DEX ;
WHERE DEX_ID == lnDexID ;
INTO ARRAY laPerson[2]
SELECT Dex
IF _TALLY # 0
REPLACE TEACHERNAM WITH laPerson[1]
REPLACE TEACHERSTR WITH laPerson[2]
juandiegomcc@afirmacion.com