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 02:16:53
 
 
À
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:
01119484
Vues:
13
>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
>
SELECT DISTINCT cperiodo ;
  FROM plhpl ;
  INTO CURSOR PeriodosEnPlhpl
SCAN 
   SELECT (lcTablaHin)
   DELETE ALL FOR cPeriodo = PeriodosEnPlhpl.cPeriodo
ENDSCAN
SELECT (lcTablaHin)
PACK
SELECT (lcTablaHin)
DELETE FROM (ALIAS()) AS X WHERE EXISTS(SELECT * FROM plhpl WHERE cPeriodo=X.cPeriodo)
PACK
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform