Hi, I want to generate a report on the basis of a By field in desending order. But when i am using Highest command, i am not getting the expected result. The field is in A4 format.
Anyone can Please Advice. It will be very helpul.
Thanks in advance.
Thanks ArpitaThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6 Windows, All Outputs
April 01, 2011, 05:43 AM
FrankDutch
Arpita
HIGHEST should be in capitals
Why dont you start posting the code you have ?
Did you try it on the CAR or EMPLOYEE database
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
April 01, 2011, 09:28 AM
FrankDutch
quote:
HIGHEST.CLK_STN_FINAL
I would not put a dot in between.
And I think when you leave the word HIGHEST out it should also work. The BY field defaults does a alpabetic sorting. Highest is only used for number if you want the highest on top.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
April 01, 2011, 09:31 AM
FrankDutch
BTW do they celebrate the 1ste of April in your country?
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
April 01, 2011, 10:02 AM
Arpita
Hi Frank, Thanks for your reply. By mistake, i have put that dot. I have tried without dot also, but not getting the result.
Can you please suggest any syntax.
And Frank we don't celebrate 1st April in my country(India).
Thanks Arpita
WebFOCUS 7.6 Windows, All Outputs
April 01, 2011, 02:04 PM
FrankDutch
leave out all the other BY statements and see what the result is.
And what is the sequence of the result?
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
April 02, 2011, 11:15 AM
George Patton
[The error of my ways has been pointed out by Frank, below. I humbly accept the public tongue-lashing! The reasoning in the following paragraphs is exactly backwards - man, what was I thinking! .... I haven't been smoking anything either....
Arpita does need the BY HIGHEST (without any dots) if he wants the PTT1 sort to appear before the PAG1 sort. BY, alone, of course sorts from lowest to highest. You need the BY HIGHEST to get the reverse sort. My apologies! The original post, with all the mistakes, follows:] ..............................................
Take out the HIGHEST all together. BY (without any HIGHEST) automatically sorts from highest to lowest. HIGHEST is redundant in this case. You only need BY HIGHEST to specify a specific number of records to select, e.g.:
BY HIGHEST 10 CLK_STN_FINAL
will give results for the first 10 instances of the sort field and ignore the rest.
In contrast, BY LOWEST has to be used for reverse sorting or, with the number parameter, can be used to select the lowest X instances of the sort field.This message has been edited. Last edited by: George Patton,
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
April 03, 2011, 09:41 AM
George Patton
Dag Frank!
OOPS ! My bad! Blame it on jet-lag.
Of course BY alone sorts from Lowest -> Highest. So the reasoning in my earlier post is exactly backwards!
You suggested leaving out the HIGHEST in an earlier post! That's what got me thinking about this in the first place.
As always one has to know what the data looks like. In this case it appears that the data in the field in question always has a capital letter in the first position so the issue of 0 -> 9 and a -> z doesn't arise.
So if Arpita wants the PTT1 sort to appear before the PAG1 sort then he does need to use BY HIGHEST (without any dot).
In his second sort (which he has commented out)it is the word LOWEST that is redundant.This message has been edited. Last edited by: George Patton,