> whval1 = boro park > wheres = WHERE contacts.CONTACT_DATE IS NOT NULL > full_where = where AGENCY_NAME cont .whval1 and ID > in (select id from > contacts &wheres) > > EDIT USING AgencyWAbbrevHist &full_where ORDER BY > agency_name > > I get -Error- Syntax Error (2367)
I would be surprised if R:Base performed recursive macro substitution on the FULL_WHERE variable. Try: SET VAR Full_Where = + 'WHERE Agency_Name CONT .whVal1 AND ID IN (SELECT ID FROM Contacts' & .WhereS + '''' and then try it. -- Larry
