Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select
Message
From
05/05/2006 21:19:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Re: Select
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01119685
Message ID:
01119826
Views:
19
>Thanks every one for all of your hard work and help.
>
>I was able to solve this.
>
>This is what I need up doing:

I would like to point out a few minor simplifications. In the statement
iif(inlist(alltrim(ccStatus), 'A', 'P', .T., .F.)
first of all, the inlist is quite unnecessary, since the condition by itself will already give .T. or .F. Second, for single characters, the $ operator can be used. The entire line can then be written as:
...
alltrim(ccStatus) $ 'AP' as lPPrnt;
Similarly, in the statement you marked as "invalid": instead of comparing logical fields to .T. or .F., just use the logical fields themselves. That is:
* Instead of
lPrnt = .T.
* it is sufficient to put
lPrnt

* and, instead of
lPrnt = .F.
* you could also write
not lPrnt && or !lPrint
>
>*//Master Cursor
>SELECT regno, ccstatus, ;
>      IIF(Inlist(Alltrim(ccstatus),'A','P'),.T.,.F.)  as lPrnt;
>      FROM cTemp;
>      ORDER BY regno ;
>      Into Cursor cRegno
>
>*//Invalid
>  SELECT regno from cRegno ;
> 	where lPrnt = .F. ;
>	Group by regno order by regno into Cursor cInvalid
>
>*//Valid
>  SELECT regno from cRegno ;
>  where regno not in (select regno from cInvalid);
>  Group by regno order by regno ;
>  Into Cursor cValid
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform