Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Index on IIF()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
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:
01625900
Vues:
51
>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?

Probably it is an error in the post, but just in case check your code because in what you posted there is a missing parenthesis...
INDEX ON IIF(EMPTY(EMPL_ID),EMPL_ID,EMPL_NAME) TAG TAGNAME
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform