Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL: Queries of this type are not supported
Message
De
05/05/2006 08:20:55
 
 
À
05/05/2006 01:29:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01119444
Message ID:
01119543
Vues:
18
>Hi Nadya,
>
>Thank you very much for your response. I don't have the exact statements anymore since I worked around the problem.
>
>The key issue is whether VFP can handle "WHERE xx NOT IN (SELECT xx FROM yy)". Help seems to say no, but "WHERE xx IN (SELECT xx FROM yy)" seems fine. The "NOT" word kills it.
>

Absolutely, NOT IN works fine.

>Reconstruction of original command (gone by now):
>
>SELECT DISTINCT cperiodo ;
>  FROM plhpl ;
>  INTO CURSOR PeriodosEnPlhpl
>
>* There was a different FROM table that was queried here, but I don't have the original code.
>SELECT * ;
>  FROM (lcTablaHin????) ;
> WHERE cperiodo NOT IN (SELECT cperiodo FROM PeriodosEnPlhpl) ;
>  INTO TABLE (lcTablaHin)
>
>

Your problem is that your first query probably resulted in a filter on the original table. Using that in a subsequent query is what's not supported. Add NOFILTER to the first query and all should be well.

FWIW, though, if all you're using the first query for is the second, there's no reason to use DISTINCT and, in fact, no reason to run a separate query. Just do the whole thing as one:
SELECT * ;
  FROM (lcTablaHin????) ;
 WHERE cperiodo NOT IN (SELECT cperiodo FROM Plhpl) ;
  INTO TABLE (lcTablaHin)
Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform