Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nasty index, any better ideas?
Message
From
08/08/2003 10:42:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00817470
Message ID:
00818234
Views:
16
>>Ah, I see. If you want numbers first. How about adding an iif(). I don't see any problem with testing the first character with left(). Apply this to the first part of the expression.
>>
>>str(val(iif(between(upper(left(CatNumber),1), "A", "Z"), 999999);
>> + CatNumber
>>
>>Well, this is getting about as messy as your original proposal, in the message that originated this thread.
>
>Yeah, that's a continual problem :-) However, I'm going to quit worrying much about complexity at this point - if the vfp index code translates to Access and it works right, I'm gonna be happy. (LEFT is a valid Access function, as I found, and I think I saw a BETWEEN-like function too. I found most, in fact, except CHRTRAN.)
>
>I need to play with your new code addition a little more, it looks pretty good in theory (something's off a little in my paren-matching, give me a few more minutes to get it working.)
>
>Actually my original code may be okay too, in that respect, now that I've been web-browsing through Access glossaries, and lowered my goals a little. I think all the vfp functions I used will translate, as will yours.

I wasn't aware it was for Access you wanted it.

See if Access supports the IsAlpha() function. The expression with IsAlpha(), which somebody else suggested on this thread, replaces a large part of my suggestion: between(... "Z")
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform