>I am obviously deficient in the skill of search. This has got be be in the forum database somewhere, but ...
>
>I am having an issue with a simple SELECT statement in VFP SP1. The error that is being returned is :
>SQL: Error correlating fields.
>
>Can I have a LIKE in a subselect or subquery?
>
>Here is my statement:
>
>
>SELECT rawhits.hostaddy FROM rawhits ;
>WHERE EXISTS (SELECT 1 FROM exclhost WHERE exclhost.hostaddy LIKE rawhits.hostaddy)
>
vfp support simple correlated subquery only.
In practice, only those for which an index can be used in subquery.
You can try this
SELECT rawhits.hostaddy FROM rawhits ;
JOIN (SELECT DISTINCT hostaddy FROM exclhost) X ON X.hostaddy LIKE rawhits.hostaddy