Basic SQL question

Thierry Nauze huancaya at wanadoo.fr
Wed Sep 22 17:33:35 CDT 2004


Le 22 sept. 04, à 05:30, Gregory Kowalski a écrit :

> 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			Saint-Denis de la Réunion


More information about the Valentina mailing list