Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index
Message
From
10/04/2012 04:46:29
 
 
To
10/04/2012 04:14:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Index
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01540782
Message ID:
01540784
Views:
47
This message has been marked as a message which has helped to the initial question of the thread.
How about:
select *, iif(c > 0, c * 10, 99) as sort from mycur into cursor mycur2 order by a, sort, b desc
browse fields a, b, c
Regards,
Pieter

>hi all,
>i need to make index or select....
>thanks
>
>CREATE CURSOR mycur(A n,B n,C n) 
>INSERT INTO mycur VALUES(1,42,2)
>INSERT INTO mycur VALUES(1,45,0)
>INSERT INTO mycur VALUES(1,23,4)
>INSERT INTO mycur VALUES(1,55,1)
>INSERT INTO mycur VALUES(1,70,0)
>INSERT INTO mycur VALUES(1,13,6)
>**********************
>INSERT INTO mycur VALUES(2,60,1)
>INSERT INTO mycur VALUES(2,80,0)
>INSERT INTO mycur VALUES(2,30,4)
>INSERT INTO mycur VALUES(2,20,0)
>INSERT INTO mycur VALUES(2,10,8)
>
>******************************
>i need result as
>a    b     c
>1    55    1 
>1    42    2
>1    23    4
>1    13    6
>1    70    0
>1    45    0 
>2    60    1
>2    30    4
>2    10    8
>2    80    0
>2    20    0
>
>
Pieter Runia
Previous
Reply
Map
View

Click here to load this message in the networking platform