Solved

OWA_UTIL.TABLEPRINT on the web

Posted on 2000-04-20
3
906 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
Comment Utility
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
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and theā€¦
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now