Solved

OWA_UTIL.TABLEPRINT on the web

Posted on 2000-04-20
3
911 Views
Last Modified: 2012-05-04
Can you specify 2 or more tables in the owa_util.tableprint command?  Kind of like instead of displaying 1 table on a web page you display a "JOIN" of two tables.
Any code examples would be appreciated!
0
Comment
Question by:reenie1
  • 2
3 Comments
 

Expert Comment

by:davecee
ID: 2746763
Yes, just create a view of the joined tables and pass the view name to owa_util.tableprint. For example:

 create view empdept (Ename, Dname) as
(select Ename, Dname from emp, dept
 where emp.deptno = dept.deptno);

 owa_util.tableprint(ctable=>'empdept', cclauses=>'order by Ename');

 In the long run it's easier to write custom table display routines for your own tables, views, and joins since tableprint is inflexible in other ways.

 Dave
0
 

Author Comment

by:reenie1
ID: 2748141
That answer was helpfull...but being a web application we do not give the user rights to create a table or a view...is it possible to use a cursor in the OWA_UTIL.TABLEPRINT command instead of a view or table?
0
 

Accepted Solution

by:
davecee earned 50 total points
ID: 2748315
You would usually create the view as a separate one-time step when installing the application, then web users would call owa_util.tableprint on that view at runtime.

 You can't use a dynamically-created object like a cursor with tableprint because it uses the Oracle data dictionary to get the names and data types of the table/view columns.

 You can however use owa_util.cellsprint with a dynamic query, maybe you should take a look at that, although as I said earlier you may find it easier just to write custom table generation procedures yourself.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question