]project-open[ : @This Wiki
Portrait

Welcome, Unregistered Visitor

Contact ·  Index · Login · Register
 

Contents

Remote Training
Support
SaaS Service

No registered users
 in last 24 hours

PL/SQL Shortcut Function

Shortcut functions are PL/SQL functions usually returning a certain field of an object, given the object_id. All of these functions could be replaced by a simple "join" as part of an SQL query, so these functions are not really necessary. However, using these functions allows to keep SQL queries more compact and readable.

 

Let's look take a typical example with "im_category_from_id" (the most frequently used shortcut function):

­ 

select
­      ­ project_id,
       project_name,
    ­   im_category_from_id(project_status_id) as project_status
­from
       im_projects
­­­­;

­

This SQL returns a list of all project_id's, together with the name of the project and a human readable project_status such as "Open" or "Closed". Without the shortcut function, the SQL would have to look like this:


select
­      ­ p.project_id,
       p.project_name,
    ­   c.category as project_status
­from
       im_projects­­­ p,
       im_categories c
where
       p.project_status_id = c.category_id
;

 

 

Admittedly, the difference is small in this example. However, many real-live SQLs in ]po[ include multiple categories, so that the shortcut functions provides a real benefit.



Please take a moment to complete this form to help us improve our service.

Note:
Please only provide feedback in regards to content this page shows. For support inquiries please refer either to the Community Support forum at Sourceforge or check out our 'Professional Support'

Did this page help you to achieve your goal?

 Yes  No  Don't know

Please provide us with comments to improve this page:

How useful is the information?

 1  2  3  4  5
Not
useful
      Extremely
useful
 
  

Explore

Installers
Demo Server
Modules & Functionality
Packages
Business Processes supported
FAQ's

Help

Getting started
User Manuals
Configuration Manuals
Community Support
Professional Support

News

News
Twitter
RSS Community / Sourceforge
Register for Newsletter

Get in touch

Contact
Register



Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License - Privacy Policy