Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on IIF()
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01625898
Message ID:
01625901
Views:
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
>
Yes, this was my typo in the post. When I was testing the actual code, I had all parenthesis matching.
"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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform