Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql problem in different language OS
Message
From
01/08/2002 11:53:09
 
 
To
01/08/2002 11:39:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00684877
Message ID:
00685036
Views:
21
>>Have a go at both possible solutions and see whether they work.
>>Difficult for me to test since I do not have access to chinese
>>
>>solution 1)
>>
>>pStartCode = 'A'
>>pEndCode  = 'Z'
>>
>>select * ;
>>    from companytable ;
>>    where ( companytable.code between pStartCode and padr(rtrim(pEndCode), len(companytable.code), 'z') )
>>
>>
>>
>>solution 2)
>>
>>pStartCode = 'A'
>>pEndCode  = 'Z'
>>
>>select * ;
>>    from companytable ;
>>    where ( companytable.code between pStartCode and pEndCode + chr(255) )
>>
>
>Z is not necessarily the last character in all languages - in mine, it's ® (z caron) which comes after Z in our alphabet.
>
>While I was using Fox with different codepages, I've discovered that the ISALPHA() function does respect the proper definition of what is a character and what is a digit or punctuation in the current codepage. So, the solution would be
>
>where isalpha(companytable.code)

Dragan,

Point taken about the z.

I don't understand the where isalpha(companytable.code) though

As far as I saw, Agnes wanted the Z included by using the char that follows the Z, ie [

I just pad the 'to' value to make it a 'to-included'

Guess Agnes will have to find out the right pad char
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform