Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: Queries of this type are not supported
Message
From
05/05/2006 10:23:49
 
 
To
05/05/2006 02:16:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01119444
Message ID:
01119588
Views:
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
>
Thank you for the suggestion Fabio.

Alex
Previous
Reply
Map
View

Click here to load this message in the networking platform