Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct
Message
From
08/10/2011 02:01:13
 
 
To
07/10/2011 08:16:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01525797
Message ID:
01525887
Views:
45
thank you for reply, sorry for that ,
i need to count f2 , and count the duplicated records(f2)
f1 f2
1 a
1 a
1 b
1 b
1 b
1 c
1 c
1 d
1 d
1 d
1 d
2
2
2
2

.
.
.
**********************result
f1 f2 f3
1 11 4


>Once more, "code does not work" is not a clear description of the problem. If you get an error message, you should say what is the error message. If the code doesn't do what you expect it to do, you should explain what you expect it to do, and how it fails (i.e., what does the code do that is different from your expectations).
>
>>hi all,
>>
>>i need help to correct this code,
>>i try to use this code not work
>>
>>
>>CLOSE ALL
>> Local lnOffice
>>
>>USE salah2
>>SELECT DISTINCT no from salah2 INTO CURSOR junk
>>
>>SCAN
>> lnoffice = junk.no
>>.
>>.
>>
>>endscan
>>
>>
>>
>>
>>i need to correct this code with another way
>>
>>CLOSE ALL
>>USE salah2
>>SET FILTER TO no=20&&lnoffice = junk.no
>>COUNT TO s
>>*brow
>>SELECT DISTINCT no,dept  FROM salah2 WHERE no=20  INTO CURSOR mycur
>>*brow
>>m.dept=dept
>>m.no=no
>>*? dept,no
>>COUNT TO k
>>*? k, s,dept,no
>>
>> USE mytable
>> APPEND BLANK
>> replace no WITH m.no
>> replace nam WITH m.dept
>> 
>> replace dis WITH k
>> replace all WITH s
>> *****************************************************************
>>CLOSE ALL
>>USE salah2
>>SET FILTER TO no=42
>>COUNT TO s
>>brow
>>SELECT DISTINCT no,dept  FROM salah2 WHERE no=42  INTO CURSOR mycur
>>brow
>>m.dept=dept
>>m.no=no
>>*? dept,no
>>COUNT TO k
>>*? k, s,dept,no
>> USE mytable
>> APPEND BLANK
>> replace no WITH m.no
>> replace nam WITH m.dept
>> 
>> replace dis WITH k
>> replace all WITH s
>>***********************
>>CLOSE ALL
>>USE salah2
>>SET FILTER TO no=...etc
>>.
>>.
>>.
>>
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform