Affichage des articles dont le libellé est problem. Afficher tous les articles
Affichage des articles dont le libellé est problem. Afficher tous les articles

vendredi 25 janvier 2013

Oracle : order by, different results [problem]


When you execute a SELECT .... ORDER BY query from a sql client (like SQuirreL), you may have a result with an order that is not the same when you execute your query with another sql client or inside your Java application.

It's depending on some locale parameters (country and language) on the client side.

For a Java application, you can update your locale by adding parameters to your jvm. 
For example : -Duser.country=en -Duser.language=en

There are more solutions here (adding a NLSSORT() to your ORDER BY clause, etc...).

FYI, you can check the NLS_LANGUAGE and the NLS_SORT on the Oracle server side :

Query:
select parameter,value from NLS_DATABASE_PARAMETERS where parameter in('NLS_LANGUAGE','NLS_SORT');

Result:
NLS_LANGUAGE AMERICAN
NLS_SORT BINARY


Source : http://stackoverflow.com/questions/8818201/oracle-order-by-different

jeudi 27 septembre 2012

ANTLR : no start rule (no rule can obviously be followed by EOF)

The problem is that Antlr identifies "start" rules (ones that can end with EOF) by looking for rules that are not used anywhere else in the grammar.

Then, you cannot call your "start" rule inside another rule. Otherwise your "start"' rule is not considered as the real "start" rule.

Categories