Basic SQL question

Gregory Kowalski gregkowalski at earthlink.net
Wed Sep 22 12:59:31 CDT 2004


On Sep 22, 2004, at 12:18 PM, valentina-request at lists.macserve.net 
wrote:

>
>> Hello,
>>
>> I'm relatively new at SQL and I am hoping someone can help me with
>> what looks like a simple problem.
>>
>> I have a database where some records contain strings in capital
>> letters, and for some reason when I want the query result to appear in
>> ascending order, the results in capital letters are out of order.
>>
>> For example if I have a db with three names:
>>
>> Paul, PHILIP and Ziggy
>>
>> the result to the query:
>>
>> SELECT * FROM table ORDER by name
>>
>> is
>>
>> PHILIP
>> Paul
>> Ziggy
>>
>> instead of
>>
>> Paul
>> PHILIP
>> Ziggy
>>
>> (ascending order)
>>
>> How can I obtain a query result in truly ascending order when there
>> are caps?
>>
>> Thanks
>>
>> Greg
>>
>> PS: the name field is VARCHAR
>
> Because your VarChar are defined as language 'ASCII' (where H < a)
> 	relation = new vVarChar ("relation", 128, "ASCII")
> 	or
> 	relation = new vVarChar ("relation", 128)
>
> Change the language in the definition of your VarChar
> 	Relation = new vVarChar ("relation", 128, "English")
> And it should give the result for which you wait...
>
> Except when 'Valentina' makes you a "farce" !
> In my case, if I use the last version of the plug-in with RealBasic,
> the created database records the VarChar in the language ASCII...
> What would return you to your point of departure !
>
> Cordially
>
> --
> Thierry Nauze	


This worked beautifully!

Merci beaucoup...

Greg




More information about the Valentina mailing list