Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

OWA_UTIL.TABLEPRINT on the web

Posted on 2000-04-20
3
915 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

Title # Comments Views Activity
Oracle SQL 6 71
Oracle 12c database link between pdb not working 20 115
PL SQL Developer 7 52
Oracle Forms 10g: How-To Prevent a Commit of 1 Record in Master-Detail block. 3 49
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…
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…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

790 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