>>Yes, this was my typo in the post. When I was testing the actual code, I had all parenthesis matching.
>>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):
>
>It should not give you an error then...
>Are EMPL_ID and EMPL_NAME the same lenght? Try (assuming ID is shorter than name)
>
>
>INDEX ON IIF(EMPTY(EMPL_ID),padr(EMPL_ID, len(EMPL_NAME)), EMPL_NAME) TAG TAGNAME
>
You are correct. The PADR() is what I was missing in the expression. Thank you!
"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