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 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:
01119480
Vues:
22
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.

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)
This is what I ended up doing:
SELECT DISTINCT cperiodo ;
  FROM plhpl ;
  INTO CURSOR PeriodosEnPlhpl
SCAN 
   SELECT (lcTablaHin)
   DELETE ALL FOR cPeriodo = PeriodosEnPlhpl.cPeriodo
ENDSCAN
SELECT (lcTablaHin)
PACK
Thank you very much. Best regards.

Alex


>>Just got a very surprising error message. "SQL: Queries of this type are not supported"
>>
>>
>>SELECT * ;
>>  FROM Table1 ;
>> WHERE FieldX NOT IN (SELECT FieldX FROM Table2) ;
>>  INTO TABLE (lcTable3Name)
>>
>>
>>Is the NOT IN not supported or is there another reason that I am missing?
>>
>>TIA,
>>
>>Alex
>
>Post the exact query you're trying to execute. I think there must be another reason.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform