Focal Point
Sort Order with NLS_LANGUAGE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3401017871

August 02, 2006, 01:13 PM
smiths
Sort Order with NLS_LANGUAGE
Does anybody know if there is a way to apply a setting of NLS_LANGUAGE to enable proper sorting of a WebFocus query?

I apply the following settings:

SQL SQLORA SET SERVER xdxgc

SQL SQLORA
ALTER SESSION SET NLS_LANGUAGE = 'FRENCH'
;
END

If I follow this up with an Oracle SQL query, the sort succeeds, whereby the special French characters are treated like English characters, and sort accordingly.

However, if I implement the equivalent query in WebFocus language, the sort does not succeed. Note that I have implemented code page 137, and have adjusted the character weightings such that e is the same weight as é, etc. But WebFocus actually gives é a weighting less than e and higher than f.

So is there some way that the NLS_LANGUAGE setting can be made to work for the WebFocus query, the same as it works for the Oracle SQL query, such as in some configuration file or something like that?

Note that I know of 2 workarounds, which I would like to avoid if possible:
1.) Revise my WebFocus code to Oracle SQL code.
2.) In the WebFocus code, sort by transformed uppercase data.

Thanks for all help!
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
August 02, 2006, 03:43 PM
susannah
quote:
é
has a bytval of 233
an E and F are 69 and 70
e and f are 101 and 102
i have no idea if this is relevant sean, i don't know if the focus sort uses the bytvals of the characters, but it appears to.
When you sort a column of characters (in a windows platform, ascii sort),the numbers(lower bytval) pop out first,
then the capital letters, then the lower case
then the funky special characters.
so i'm puzzled by how your webfocus sort placed
your e acute as you reported.
I just gave a try, and got
PAGE 1 
 
BYTVAL 
1 
2 
3 
4 
5 
6 
A 
B 
C 
D 
E 
F 
G 
H 
a 
b 
c 
d 
e 
f 
g 
h 
é 






In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 02, 2006, 03:53 PM
smiths
Susannah,

Thanks for the response.

In the code page file (cp00137.nls), I can change the character weightings so that they sort in a different order. I then run a TSGU command to implement this change. However, even with this change, the sort doesn't work quite right. If I change the weighting of the accented characters to the same weighting as their English character counterpart, they sort immediately after the English character counterpart, and not equivalent to the character. I discussed this with IBI NY, and they determined that it was meant to work this way (seems like a bug to me!).

So I learned of this NLS_LANGUAGE SQL command, but it only works for SQL passthru, and not for WF TABLE FILE commands. Frowner

So I was hoping there is some way that this syntax can be made to operate on the WF TABLE FILE, so I don't have to go rework a bunch of code.

Hope I made sense.

Thanks,
Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
August 02, 2006, 07:03 PM
susannah
over my head, i'm afraid, Sean,
Maybe T or Francis will weight in.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID