Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make an index
Message
From
26/08/2008 10:34:42
 
 
To
25/08/2008 16:43:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01341632
Message ID:
01341804
Views:
15
This message has been marked as the solution to the initial question of the thread.
Hi,

if I've got it properly:

index on iif(empty(Field2), Field1 + space(8), Field2 + str(99999999-val(chrtran(field3,"/","")),8) ) tag f0

BTW, there's a typo in the record with 'number2', it's 'bdce' instead of 'bcde'

Regards,
Sergey

>Hi,
>
>I need to index a table, which I now almost believe I am looking for the impossible, but knowing nothing is impossible. Here is my problem:
>
>create cursor toindex (field1 c(20), field2 c(20), FIELD3 c(20))
>insert into toindex (field1,field2,FIELD3) values ('abcd', ' ', 'number1')
>insert into toindex(field1,field2,FIELD3) values('efgh','abcd','31/03/2008')
>insert into toindex(field1,field2,FIELD3) values('ghij','bcde','11/05/2008')
>insert into toindex(field1,field2,FIELD3) values('hiij','bcde','18/05/2008')
>insert into toindex (field1,field2,FIELD3) values ('bdce',' ','number2')
>insert into toindex(field1,field2,FIELD3) values('fghi','abcd','01/03/2008')
>
>what I need is a sequence :
>
>abcd " " number1
>efgh abcd 31/03/2008
>fghi abcd 01/03/2008
>bcde " " number2
>hiij bcde 18/05/2008
>ghij bcde 11/05/2008
>
>field number 3 contents either characters in which case field number2 = empty or a date(dd/mm/yyyy)
>field number 2 has a crossrefrence to field1 (just like in a simple treeview)
>
>How to compose my index?
>
>Any assistance is highly appreciated!
>
>Thanks,
>
>Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform