Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Must repeat line of code to get results
Message
 
 
To
15/06/2009 17:10:12
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01406206
Message ID:
01406227
Views:
58
You missed this part of my article:
"Multiple-table queries that use those functions (even without an optional alias) in most cases will return unexpected and incorrect results".

>If that is the case, then why does
> SELECT * FROM SourceDBF ;
> WHERE ;
> PRIN + Agent IN (SELECT PRIN + Agent FROM FAT_BASIC_AREAS_EXCLUSIONS) ;
> and NOT DELETED() ;
> INTO CURSOR curToRemove NOFILTER
> SELECT * FROM SourceDBF ;
> WHERE ;
> PRIN + Agent IN (SELECT PRIN + Agent FROM FAT_BASIC_AREAS_EXCLUSIONS) ;
> and NOT DELETED() ;
> INTO CURSOR curToRemove NOFILTER
>
>work when DELETED = OFF ,but just one of those statements does not work?
>
>With DELETED = ON, then
> SELECT * FROM SourceDBF ;
> WHERE ;
> PRIN + Agent IN (SELECT PRIN + Agent FROM FAT_BASIC_AREAS_EXCLUSIONS) ;
> and NOT DELETED() ;
> INTO CURSOR curToRemove NOFILTER
>
>works just fine. Note the AND NOT DELETED() is still in the query.
>
>I looked at your reference and I fully understand it. I have known about that for a very long time and use table references with care. In this case, there is no table reference.
>
>In fact, only one other time (that I can remember) have I ever run into this problem where the first time a line is run it does not give the desired results. I don't remember what it was that I was doing, but I believe that DELETED = OFF was the case there as well. I don't know if NOT DELETED() was in the SQL or not at that time.
>
>David
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform