Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL: Queries of this type are not supported
Message
 
 
To
05/05/2006 01:29:46
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01119444
Message ID:
01119554
Views:
20
I never had problems before running this type of queries.

>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform