As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I'm looking to convert the SQL "DENSE_RANK" command to WebFOCUS code? Is there a direct way to do this? Or, should it be done via a HOLD file or two? I'm not looking to have someone do this for me, just some Pointers would be fine.
Has anyone successfully done this in WebFOCUS?
More info on the SQL "DENSE_RANK" command can be found right here, and here.This message has been edited. Last edited by: Doug,
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
Hi Doug, doubt this simple code is what you are looking for, but, here goes anyway:
TABLE FILE CAR
SUM
DEALER_COST/P13.2M AS 'Dealer Cost'
RETAIL_COST/P13.2M AS 'Retail Cost'
COMPUTE PROFIT/P13.2M = RETAIL_COST-DEALER_COST; AS 'Profit'
SALES/P13.2M AS 'Sales'
BY COUNTRY AS 'Country'
RANKED AS 'Rank'
BY DEALER_COST NOPRINT
BY CAR AS 'Car'
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Style'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.400000,
RIGHTMARGIN=0.050000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
ORIENTATION=LANDSCAPE,
SQUEEZE=ON,
$
TYPE=TITLE, STYLE=BOLD, SIZE=10, FONT=VERDANA,$
TYPE=REPORT, TITLETEXT='Report 1',$
ENDSTYLE
END
-RUN
-EXIT
Well, I don't see anything ranked there, just low-to-high salaries? What am I missing???
TABLE FILE CAR
SUM
MIN.DEALER_COST AS 'Lowest'
MAX.DEALER_COST AS 'Highest'
BY COUNTRY AS 'Country'
SUM
DEALER_COST
BY COUNTRY AS 'Country'
RANKED AS 'Rank'
BY DEALER_COST NOPRINT
BY CAR AS 'Car'
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Style'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
-* ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE PCHOLD FORMAT &FMT
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.400000,
RIGHTMARGIN=0.050000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
ORIENTATION=LANDSCAPE,
SQUEEZE=ON,
$
TYPE=TITLE, STYLE=BOLD, SIZE=10, FONT=VERDANA,$
TYPE=REPORT, TITLETEXT='Report 1',$
TYPE=REPORT, COLUMN=N2, SEQUENCE=98, COLOR=BLUE,$
TYPE=REPORT, COLUMN=N3, SEQUENCE=99, COLOR=RED,$
ENDSTYLE
END
-RUN
-EXIT
This message has been edited. Last edited by: Tom Flynn,
SET BYDISPLAY=ON
DEFINE FILE CAR
LASTDC/D20C = LAST DCOST
END
TABLE FILE CAR
SUM MIN.DEALER_COST AS 'Lowest'
MAX.DEALER_COST AS 'Highest'
LASTDC NOPRINT
RANKED BY DEALER_COST AS 'Dealer Cost'
BY COUNTRY AS 'Country'
BY CAR AS 'Car'
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Style'
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT &FMT
ON TABLE SET STYLE *
UNITS=IN,PAGESIZE='Letter', ORIENTATION=LANDSCAPE, SQUEEZE=ON,$
TYPE=REPORT, TITLETEXT='DENSE_RANK sample',$
TYPE=TITLE, STYLE=BOLD, SIZE=10, FONT=VERDANA,$
TYPE=REPORT, COLUMN=N3, SEQUENCE=2,$
TYPE=REPORT, COLUMN=N4, SEQUENCE=3,$
TYPE=REPORT, COLUMN=N2, SEQUENCE=6,$
TYPE=DATA, BACKCOLOR=RGB(222 222 222), COLOR=RED, WHEN = DEALER_COST EQ LASTDC,$
ENDSTYLE
END
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005