select G.cStyle, G.kGarment, G.cDescrip, G.nDefPrice, ; iif(lkLoc in ; (select LG.kLoc from LocGarment LG where LG.kGarment = G.kGarment), ; "L", "X") as cType ; from Garments G... the error message is just that it needs a comma (I think that it's parsing the real error message and reporting on it). What I'm trying to do is to add and populate a calculated field (cType) so the subselect is located in the field list. I pulled it out just to see if being in the field list was the problem.
select G.cStyle, G.kGarment, G.cDescrip, G.nDefPrice ; > from Garments G ; > INNER JOIN LocGarment LG ON (LG.kGarment = G.kGarment) AND (LG.kLoc = lkLoc)>VFP doesn't like the following, and chokes on the subselect with the error message: "SQL: Queries of this type are not supported."
>>select G.cStyle, G.kGarment, G.cDescrip, G.nDefPrice ; >> from Garments G ; >> where lkLoc in (select LG.kLoc from LocGarment LG ; >> where LG.kGarment = G.kGarment ) >>>>