Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Xbase equivalent of Select distinct
Message
From
29/04/2005 09:57:52
Suhas Hegde
Dental Surgeon
Sirsi, India
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01009591
Message ID:
01009620
Views:
8
>>Hi,
>>
>>Can any 1 just show me what is the equivalent way of
>>
>>Select Distinct f1 from foo into cursor foo1
>>
>>
>>to do using Xbase codes ?
>>
>>TIA
>>
>>suhashegde
>
>
>CREATE CURSOR Foo1 (F1 C(10))
>INDEX ON F1 TAG Foo1
>
>SELECT Foo
>SCAN
>   SELECT Foo1
>   SEEK Foo.F1
>   IF NOT FOUND()
>      APPEND BLANK
>      REPLACE F1 WITH Foo.F1
>   ENDIF
>   SELECT Foo
>ENDSCAN
>
These codes take 0.01 sec to run where as sql statement takes 0.15 sec to run

thanx
suhashegde
Previous
Reply
Map
View

Click here to load this message in the networking platform