Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> January's PL/SQL Puzzler
From the PL/SQL Pipeline
(http://www.revealnet.com/plsql-pipeline/index.htm). Solve this month's
Puzzler and your name will be entered into a drawing for a free technical
book from O'Reilly & Associates (http://www.ora.com)
January's PL/SQL Puzzler
Steven Feuerstein writes:
Consider the Print dialogue in Microsoft Word; in the paper range box, you can specify All, Current Page or specific Pages.
The puzzle this month is to build a PL/SQL utility (a.k.a, API, a.k.a., package) that might be used by Microsoft (if Bill Gates was not so hung up about using Basic or Java or C or C++, instead of the substantially more robust Oracle PL/SQLlanguage) to take your entry for Pages and translate that string into a list of integer values.
Does this seem frivolous? Not so! I ran into a need for it just the other day. I continue to fine-tune PL/Generator, a code generator for PL/SQL that RevealNet will release in the first quarter of 1998. With PL/Generator, you set up templates based on one or more template files. A template file has a sequence number. The standard template for Table Encapsulation (wrapping a package around a table) in PL/Generator consists of these files:
(PUZZLE SPECS OMITTED TO SAVE BANDWIDTH)
There are several aspects to consider for this puzzle:
Some hints:
•If you have access to PL/Vision Professional, I suggest you take a look at the PLVseg package. •If you receive the Oracle Developer newsletter from Pinnacle, I suggest you take a look at the May 1997 issue (or get in touch with Pinnacle at www.pinpub.com.
Consider using a PL/SQL table (index table in Oracle8-speak) to communicate your list of integers back to the user.
Best wishes,
Cam White
RevealNet, Inc.
Received on Tue Jan 13 1998 - 00:00:00 CST
![]() |
![]() |