Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integer/date compound index
Message
De
28/06/2007 11:55:48
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01236371
Message ID:
01236434
Vues:
9
>>Actually, I think that is a good question.
>>I'm trying to create a relationship between two tables through record ids, but I want the child table to be in reverse date order.
>>
>>Do you think I going about it correctly?
>
>In your current task description you're correct. If, for example, you would want a key based on a numeric field (not integer) in ascending order
>and a date in descending order, you would use something like:
>
>
padl(myNumField,10,'0') + padl({^9999-01-01} - DateField),10,'0')
>
>The idea was discussed long time ago here as well.
>
>But it would not work for NULL and empty dates, so the index expression should be a little bit more complex...

No need for tricky expressions:) bintoc()+dtos(), descending.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform