Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on IIF()
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Index on IIF()
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01625898
Message ID:
01625898
Vues:
70
Hi,

I have a report cursor that has two columns (simplified), EMPL_ID, EMPL_NAME. Some records of the cursor have EMPL_NAME blank (even though EMPL_ID has value). But there is one record that has both the EMPL_ID and EMPL_NAME blank.

And I want to index this cursor on EMPL_NAME but the record with both EMPL_ID and EMPL_NAME blank should be at the top. I tried the following (but it gives error):
INDEX ON IIF(EMPTY(EMPL_ID,EMPL_ID,EMPL_NAME) TAG TAGNAME
I can update the value of the EMPL_NAME of the blank EMPL_ID with anything but so far I cannot find a value that will "put" this record at the top (because some other records could have blank EMPL_NAME too).

Any suggestions?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform