<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4001637245518580860</id><updated>2012-02-16T14:32:40.186-02:00</updated><title type='text'>come learn and share</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-1299254293270797832</id><published>2008-09-09T02:56:00.001-03:00</published><updated>2008-09-09T02:58:02.913-03:00</updated><title type='text'>P2P cycle</title><content type='html'>Requisition.&lt;br /&gt;When the requisition will occur, whenever there is a demand for some service/items concerns will raise the Requisition. Here as slide shows the Demand may raise from MRP, Legacy Systems, Order Management etc.,&lt;br /&gt;MRP :-&lt;br /&gt;This is Oracle Tool which will tell us the Material Requirement for the given period of time, as an action of this result oracle will automatically create Requisition to the concern supplier as per the initial setup we have given to Oracle.&lt;br /&gt;Legacy Systems.&lt;br /&gt;From legacy systems too which having the planning tool the requisition may occur.&lt;br /&gt;Order Management.&lt;br /&gt;In Order Management we will create order for the customer. Now the scenario is, the customer need the service/Item immediately. Which we do not have it in hand. By sourcing the material from Supplier and shipping the same to customer may require additional time. In this case we can use oracle functionality called “DROP SHIPMENT”. Whenever the order is created with the batch name DS, the requisition will automatically created and send to supplier and in tern supplier will ship the render the service to customer directly.&lt;br /&gt;Manual .&lt;br /&gt;We can also create the Requisition manually.&lt;br /&gt;If the requested service lies with our Organization means create the requisition as internal Sales Order or as PO.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-1299254293270797832?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/1299254293270797832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=1299254293270797832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/1299254293270797832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/1299254293270797832'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/09/p2p-cycle.html' title='P2P cycle'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-5039284699207415970</id><published>2008-08-16T07:23:00.002-03:00</published><updated>2008-08-16T07:24:42.401-03:00</updated><title type='text'>ఒరాకిల్ అప్లికేషన్స్ terminology</title><content type='html'>Oracle Apps Technical Terms&lt;br /&gt;§                                 Invoice&lt;br /&gt;§                                 Receipt&lt;br /&gt;§                                 Customer&lt;br /&gt;§                                 Vendor&lt;br /&gt;§                                 Buyer&lt;br /&gt;§                                 Supplier&lt;br /&gt;§                                 Purchase Order&lt;br /&gt;§                                 Requisition&lt;br /&gt;§                                 ACH: Account Clearance House&lt;br /&gt;&lt;br /&gt;§                                 Sales Order&lt;br /&gt;§                                 Pack Slip&lt;br /&gt;§                                 Pick Slip&lt;br /&gt;§                                 Drop Ship&lt;br /&gt;§                                 Back Order&lt;br /&gt;§                                 ASN: Advance Shipping Notice&lt;br /&gt;§                                 ASBN: Advance Shipping Billing Notice&lt;br /&gt;§                                 ATP: Available to Promise&lt;br /&gt;§                                 Lot/Serial Number&lt;br /&gt;&lt;br /&gt;§                                 DFF: Descriptive Flex Fields&lt;br /&gt;§                                 KFF: Key Flex Fields&lt;br /&gt;§                                 Value Sets&lt;br /&gt;§                                 Organization&lt;br /&gt;§                                 Business Unit&lt;br /&gt;§                                 Multi Org&lt;br /&gt;§                                 Folders&lt;br /&gt;§                                 WHO Columns&lt;br /&gt;&lt;br /&gt;§                                 Oracle Reports&lt;br /&gt;§                                 Oracle Forms&lt;br /&gt;§                                 Workflow Builder&lt;br /&gt;§                                 Toad&lt;br /&gt;§                                 SQL Developer&lt;br /&gt;§                                 SQL Navigator&lt;br /&gt;§                                 Discoverer Reports&lt;br /&gt;§                                 XML/BI Publisher&lt;br /&gt;§                                 ADI: Application Desktop Integrator&lt;br /&gt;§                                 Winscp&lt;br /&gt;§                                 Putty&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-5039284699207415970?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/5039284699207415970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=5039284699207415970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/5039284699207415970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/5039284699207415970'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/08/terminology.html' title='ఒరాకిల్ అప్లికేషన్స్ terminology'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-3023822166557426628</id><published>2008-04-30T04:30:00.001-03:00</published><updated>2008-04-30T04:30:23.152-03:00</updated><title type='text'></title><content type='html'>Oracle  Questions and Answers : SQL&lt;br /&gt;1.      To see current user name  Sql&gt; show user;&lt;br /&gt;2.      Change SQL prompt name  SQL&gt; set sqlprompt “Manimara &gt; “ Manimara &gt; Manimara &gt;&lt;br /&gt;3.      Switch to DOS prompt  SQL&gt; host&lt;br /&gt;4.      How do I eliminate the duplicate rows ?  SQL&gt; delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL&gt; delete duplicate_values_field_name dv from table_name ta where rowid &lt;(select min(rowid)  from table_name tb where ta.dv=tb.dv); Example. Table Emp Empno Ename 101               Scott 102               Jiyo 103               Millor 104               Jiyo 105               Smith delete ename from emp a where rowid &lt; ( select min(rowid) from emp b where a.ename = b.ename); The output like, Empno Ename 101               Scott 102               Millor 103               Jiyo 104               Smith&lt;br /&gt;5.      How do I display row number with records? To achive this use rownum pseudocolumn with query, like SQL&gt; SQL&gt; select rownum, ename from emp; Output: 1                    Scott 2                    Millor 3                    Jiyo 4                    Smith&lt;br /&gt;6.      Display the records between two range select rownum, empno, ename  from emp  where  rowid in  (select rowid from emp where rownum &lt;=&amp;amp;upto  minus  select rowid from emp where rownum&lt;&amp;amp;Start); Enter value for upto: 10 Enter value for Start: 7&lt;br /&gt;   ROWNUM     EMPNO ENAME --------- --------- ----------         1      7782 CLARK         2      7788 SCOTT         3      7839 KING         4      7844 TURNER&lt;br /&gt;7.      I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable”  want to display, instead of blank space. How do I write the query?&lt;br /&gt; SQL&gt; select nvl(to_char(comm.),'NA') from emp;&lt;br /&gt;Output :&lt;br /&gt;NVL(TO_CHAR(COMM),'NA') ----------------------- NA 300 500 NA 1400 NA NA&lt;br /&gt;8.      Oracle cursor : Implicit &amp;amp; Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements. PL/SQL construct to identify each and every work are used, is called as Cursor. For SQL queries returning a single row, PL/SQL declares all implicit cursors. For queries that returning more than one row, the cursor needs to be explicitly declared.&lt;br /&gt;9.      Explicit Cursor attributes  There are four cursor attributes used in Oracle cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN&lt;br /&gt;10.  Implicit Cursor attributes  Same as explicit cursor but prefixed by the word SQL&lt;br /&gt;SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN&lt;br /&gt;Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements.        : 2.  All are  Boolean attributes.&lt;br /&gt;11.  Find out nth highest salary from emp table  SELECT DISTINCT (a.sal) FROM EMP A WHERE &amp;amp;N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal&lt;=b.sal);&lt;br /&gt;Enter value for n: 2       SAL ---------      3700&lt;br /&gt;12.  To view installed Oracle version information  SQL&gt; select banner from v$version;&lt;br /&gt;13.  Display the number value in Words  SQL&gt; select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; the output like,&lt;br /&gt;      SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP')) --------- -----------------------------------------------------       800 eight hundred      1600 one thousand six hundred      1250 one thousand two hundred fifty If you want to add some text like, Rs. Three Thousand only. SQL&gt; select sal  "Salary ",  (' Rs. ' (to_char(to_date(sal,'j'), 'Jsp')) ' only.'))  "Sal in Words" from emp / Salary  Sal in Words ------- ------------------------------------------------------     800  Rs. Eight Hundred only.    1600  Rs. One Thousand Six Hundred only.    1250  Rs. One Thousand Two Hundred Fifty only.&lt;br /&gt;14.  Display Odd/ Even number of records  Odd number of records: select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp); 1 3 5 Even number of records: select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp) 2 4 6&lt;br /&gt;15.  Which date function returns number value?  months_between&lt;br /&gt;16.  Any three PL/SQL Exceptions?  Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others&lt;br /&gt;17.  What are PL/SQL Cursor Exceptions?  Cursor_Already_Open, Invalid_Cursor&lt;br /&gt;18.  Other way to replace query result null value with a text  SQL&gt; Set NULL ‘N/A’ to reset SQL&gt; Set NULL ‘’&lt;br /&gt;19.   What are the more common pseudo-columns?  SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM&lt;br /&gt;20.   What is the output of SIGN function?  1 for positive value, 0 for Zero, -1 for Negative value.&lt;br /&gt;21.  What is the maximum number of triggers, can apply to a single table?  12 triggers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-3023822166557426628?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/3023822166557426628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=3023822166557426628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3023822166557426628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3023822166557426628'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/oracle-questions-and-answers-sql-1.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-234219639414826870</id><published>2008-04-30T04:29:00.003-03:00</published><updated>2008-04-30T04:30:00.804-03:00</updated><title type='text'></title><content type='html'>FREQUENTLY ASKED QUESTIONS AND ANSWERS FOR SRW&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;1. What do I need to do to upgrade reports from SRW 1.0 to 1.1?&lt;br /&gt;&lt;br /&gt;   User must export all the 1.0 SRW tables and import them into database&lt;br /&gt;   with SRW 1.1. Then he should use 'moverep' to move all the data in&lt;br /&gt;   these 1.0 tables to 1.1 tables. 1.0 tables prefixed 'FR_' while&lt;br /&gt;   1.1 tables prefixed 'SRW_'.&lt;br /&gt;&lt;br /&gt;2. Can I use 'dumprep' to dump my 1.0 reports and load them into 1.1 SRW&lt;br /&gt;   by using 'loadrep'?&lt;br /&gt;&lt;br /&gt;   Even though SRW provides utilities called 'dumprep' dumping reports&lt;br /&gt;   from database into .rex files and 'loadrep' to load these ascii .rex&lt;br /&gt;   on other hosts and operating systems, user should not use them to&lt;br /&gt;   upgrade their SRW from 1.0 to 1.1, due to different table structures&lt;br /&gt;   and definitions between these 2 versions.&lt;br /&gt;&lt;br /&gt;3. When installing SRW, it asks if I want to install one central set of&lt;br /&gt;   tables or each user has its own set of tables, which one should&lt;br /&gt;   I choose? Why?&lt;br /&gt;&lt;br /&gt;   All the report data and format info are stored in tables.&lt;br /&gt;   These so called 'SRW_' tables may be created under the 'system' account&lt;br /&gt;   such that they may be shared by all SRW users, or these tables may be&lt;br /&gt;   created under individual accounts - each user has his own set of&lt;br /&gt;   tables.&lt;br /&gt;   In order to use one set of central tables, the user must have TPO&lt;br /&gt;   installed. Having one set of central tables makes managing SRW easier&lt;br /&gt;   and causes all the reports be shared by all users.&lt;br /&gt;&lt;br /&gt;4. Why do I get message 'Unable to access the SQL*ReportWriter V1.1 tables.'&lt;br /&gt;   when logging in SRW, even though the user is a valid database account?&lt;br /&gt;&lt;br /&gt;   If SRW is installed with one set of central tables, then all SRW users&lt;br /&gt;   except 'system' need to be added by running a script called 'srw.admin'&lt;br /&gt;   under ?/sqlreport/admin.&lt;br /&gt;   If SRW is installed with local tables for each user, then the 'SRW_'&lt;br /&gt;   tables must be created under the user account. The script needs to be run&lt;br /&gt;   is called 'srw_iloc.sql' under ?/sqlreport/admin or the 'srw.admin' and&lt;br /&gt;   choose the right option.&lt;br /&gt;&lt;br /&gt;5. What is srw.admin? How should I make use of it?&lt;br /&gt;&lt;br /&gt;   Srw.admin is a script for SRW administrative uses. It adds, drops a user,&lt;br /&gt;   relinks user exit into the executables, etc.&lt;br /&gt;   One should go to ?/sqlreport/admin directory, set enviornment variable&lt;br /&gt;   by 'setenv LOG test' for error logs when running the script. Then type&lt;br /&gt;   'srw.admin' and choose the appropriate actions.&lt;br /&gt;   'srw.admin' runs other sql script within the same directory, such as&lt;br /&gt;   srw_icen.sql, srw_grnt.sql, etc.&lt;br /&gt;&lt;br /&gt;6. How do I relink user exits into SRW executables?&lt;br /&gt;&lt;br /&gt;   In the IUG there is a section regarding creating user exits, but not very&lt;br /&gt;   clear. The steps for creating forms user exits in the IUG will be also&lt;br /&gt;   helpful.&lt;br /&gt;   After the iapxtb.o is created, one should use the 'srw.admin' script&lt;br /&gt;   and choose the 'Relink the executables with user exits'. Remember to&lt;br /&gt;   set the 'LOG' enviornment variable for error checking and move your&lt;br /&gt;   own copy of iapxtb.o to the directory you desire.&lt;br /&gt;&lt;br /&gt;7. Why do I get 'ORA-2112 pcc: select...into returns too many rows' when&lt;br /&gt;   running SRW?&lt;br /&gt;&lt;br /&gt;   It is likely that user has duplicate rows in the system.product_profile&lt;br /&gt;   table. The reason may due to duplicate import or install of SRW system&lt;br /&gt;   tables.&lt;br /&gt;   The way to deal with the problem is to remove all the duplicate rows&lt;br /&gt;   in this table.&lt;br /&gt;&lt;br /&gt;8. What is the product_profile table for?&lt;br /&gt;&lt;br /&gt;   The product_profile table gives DBA control of application usage and&lt;br /&gt;   resouce limit, such as restricting the page limit for SRW users, or&lt;br /&gt;   removing the host command from normal SQL*Plus users.&lt;br /&gt;   Currently only SRW and SQL*Plus make use of this table.&lt;br /&gt;   Refer 'SQL*Plus User's Guide and Reference 3.0' Appendix E and sql&lt;br /&gt;   script 'pupbld.sql' under ?/sqlplus/admin for more info.&lt;br /&gt;&lt;br /&gt;9. When looking at the system SRW table, I find 'SRW_SUMMARY' and&lt;br /&gt;   'SRW__SUMMARY', what is the difference?&lt;br /&gt;&lt;br /&gt;   The difference is that 'SRW_SUMMARY' is a view of 'SRW__SUMMARY'.&lt;br /&gt;   Overall, 'SRW_' are views with slight modification of the original&lt;br /&gt;   tables 'SRW__'.&lt;br /&gt;&lt;br /&gt;10. Why do I get 'Out of space on device' when I try to print out a&lt;br /&gt;    report on printer?&lt;br /&gt;&lt;br /&gt;    The 'Out of space' message usually comes from /tmp being full.&lt;br /&gt;    The reason is that SRW first generates a temporary file in the&lt;br /&gt;    /tmp directory, then spool it out through 'spoolcmd' under&lt;br /&gt;    ?/sqlreport/admin/printer.&lt;br /&gt;    The workaround to this problem is to set enviornment variable&lt;br /&gt;    SRW_TMP to directory with more disk space.&lt;br /&gt;&lt;br /&gt;11. Why does SRW generate a temporary file in /tmp?&lt;br /&gt;&lt;br /&gt;    SRW uses a two-pass scheme for generating report. For example, in order&lt;br /&gt;    to print out '1 of 10 pages' at the top of each page, the first pass&lt;br /&gt;    gives the total number of pages, while the second pass fill in the&lt;br /&gt;    number '1' at the appropriate page.&lt;br /&gt;    The temporary file generated in /tmp with file name such as 'SRW06536001'&lt;br /&gt;    makes the second pass possible.&lt;br /&gt;&lt;br /&gt;12. What is the difference between spoollp.sh, spoolpr.sh and spoolcmd?&lt;br /&gt;&lt;br /&gt;    'Spoolcmd' is usually linked with either spoollp.sh or spoolpr.sh,&lt;br /&gt;    depending on the version of unix system (att or bsd). 'spoollp.sh'&lt;br /&gt;    uses 'lp' to spool reports, while 'spoollpr.sh' uses 'lpr'.&lt;br /&gt;&lt;br /&gt;13. I tried to print out reports on a DEC printer and have specified&lt;br /&gt;    the printer definition as 'decland' for landscape mode. However,&lt;br /&gt;    the report still came out in protrait mode. What did I do wrong?&lt;br /&gt;&lt;br /&gt;    User who wants to print out landscape report should first find&lt;br /&gt;    the escape sequence which will change the printer from protrait&lt;br /&gt;    mode to landscape mode. Then he should modify the ':is=' cause&lt;br /&gt;    within the 'printdef.dat' file under ?/sqlreport/admin/printer&lt;br /&gt;    by adding the escape sequence.&lt;br /&gt;    Generate a new 'decland' printer definition file using SRW&lt;br /&gt;    utility 'printdef' (refer SRW User's Guide for the usage).&lt;br /&gt;&lt;br /&gt;14. Is it possible to mail a report to an Oracle*Mail user within SRW?&lt;br /&gt;&lt;br /&gt;    'Mail' is one of the options for 'DESTYPE' parameter. User should&lt;br /&gt;    also specify the 'DESNAME' as Oracl*Mail userid whom the report is&lt;br /&gt;    supposed to be sent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-234219639414826870?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/234219639414826870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=234219639414826870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/234219639414826870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/234219639414826870'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/frequently-asked-questions-and-answers.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-5668880364644049758</id><published>2008-04-30T04:29:00.001-03:00</published><updated>2008-04-30T04:29:38.909-03:00</updated><title type='text'></title><content type='html'>FORMS 3.0 BASIC 1.What is an SQL *FORMS? SQL *forms is 4GL tool for developing and executing; Oracle based interactive application. 2. What is the maximum size of a form? 255 character width and 255 characters Length. 3. Name the two files that are created when you generate the form give the filex extension? INP (Source File)  FRM (Executable File) 4. How do you control the constraints in forms? Select the use constraint property is ON Block definition screen. BLOCK 5. Commited block sometimes refer to a BASE TABLE? True or False. False. 6. Can we create two blocks with the same name in form 3.0? No. 7.  While  specifying  master/detail relationship between two blocks specifying the join condition is a must? True or False. True. 8. What is a Trigger? A piece of logic that is executed at or triggered by a SQL *forms event.  9. What are the types of TRIGGERS? 1. Navigational Triggers.  2. Transaction Triggers. 10. What are the different types of key triggers?   Function Key  Key-function  Key-others  Key-startup 11. What is the difference between a Function Key Trigger and Key Function Trigger? Function key triggers are associated with individual SQL*FORMS function keysYou can attach Key function triggers to 10 keys or key sequences that normally do not perform any SQL * FORMS operations. These keys refered as key F0 through key F9. 12. What does an on-clear-block Trigger fire? It fires just before SQL * forms the current block. 13. How do you trap the error in forms 3.0? using On-Message or On-Error triggers. 14. State the order in which these triggers are executed? POST-FIELD,ON-VALIDATE-FIELD,POST-CHANGE and KEY-NEXTFLD.KEY-NEXTFLD,POST-CHANGE, ON-VALIDATE-FIELD, POST-FIELD. 15. What is the usuage of an ON-INSERT,ON-DELETE and ON-UPDATE TRIGGERS? These triggers are executes when inserting,deleting and updating operations are  performed and can be used to change the default function of insert,delete or update respectively. For Eg, instead of inserting a row in a table an existing row can be updated in the same table. 16. When will ON-VALIDATE-FIELD trigger executed? It fires when a value in a field has been changed and the field status is changed or new and the  key has been pressed. If the field status is valid then any further change to the value in the field will not fire the on-validate-field trigger. 17. A query fetched 10 records How many times does a PRE-QUERY Trigger and POST-QUERY Trigger will get executed? PRE-QUERY fires once.  POST-QUERY fires 10 times. 18. What is the difference between ON-VALIDATE-FIELD trigger and a POST-CHANGE trigger? When you changes the Existing value to null, the On-validate field trigger will fire post change trigger will not fire. At the time of execute-query post-chage trigger will fire, on-validate field trigger will not fire. 19. What is the difference between an ON-VALIDATE-FIELD trigger and a trigger? On-validate-field trigger fires, when the field Validation status New or changed.Post-field-trigger whenever the control leaving form the field, it will fire. 20. What is the difference between a POST-FIELD trigger and a POST-CHANGE trigger? Post-field trigger fires whenever the control leaving from the filed.Post-change trigger fires at the time of execute-query procedure invoked or filed validation status changed. 21. When is PRE-QUERY trigger executed? When Execute-query or count-query Package procedures are invoked. 22. Give the sequence in which triggers fired during insert operations, when the following 3 triggers are defined at the smae block level? a. ON-INSERT b. POST-INSERT c. PRE-INSERT PRE-INSERT,ON-INSERT &amp;amp; POST-INSERT. 23. Can we use GO-BLOCK package in a pre-field trigger? No. 24. Is a Keystartup trigger fires as result of a operator pressing a key explicitly? No. 25. How can you execute the user defined triggers in forms 3.0? Execute_Trigger (trigger-name) 26. When does an on-lock trigger fire? It will fires whenever SQL * Forms would normally attempt to lock a row. 26. What is Post-Block is a  . a. Navigational Trigger. b. Key trigger c. Transaction Trigger. Navigational Trigger. 27. What is the difference between keystartup and pre-form? Key-startup trigger fires after successful navigation into a form. Pre-form trigger fires before enter into the form. 28. What is the difference between keystartup and pre-form? Key-startup triigger fires after successful navigation into a form.Pre-form trigger fires before enter into the form. PACKAGE PROCEDURE &amp;amp; FUNCTION 29. What is a Package Procedure? A Package proecdure is built in PL/SQL procedure. 30. What are the different types of Package Procedure? 1. Restricted package procedure.  2. Unrestricted package proecdure. 31. What is the difference between restricted and unrestricted package procedure?Restricted package procedure that affects the basic basic functions of SQL * Forms. It cannot used in all triggers execpt key triggers. Unrestricted package procedure that does not interfere with the basic functions of SQL * Forms it can be used in any triggers. 32. Classify the restricted and unrestricted procedure from the following. a. Call b. User-Exit c. Call-Query d. Up e. Execute-Query f. Message g. Exit-From h. Post i. Break a. Call - unrestricted b. User Exit - Unrestricted c. Call_query - Unrestricted d. Up - Restricted e. Execute Query - Restricted f. Message - Restricted g. Exit_form - Restricted h. Post - Restricted i. Break - Unrestricted. 33. Can we use a restricted package procedure in ON-VALIDATE-FIELD Trigger? No. 34. What SYNCHRONIZE procedure does? It synchoronizes the terminal screen with the internal state of the form. 35. What are the unrestricted procedures used to change the popup screen position during run time? Anchor-view Resize -View Move-View. 36. What Enter package procedure does? Enter Validate-data in the current validation unit. 37. What ERASE package procedure does? Erase removes an indicated global variable. 38. What is the difference between NAME_IN and COPY? Copy is package procedure and writes values into a field.Name in is a package function and returns the contents of the variable to which you apply. 38. Identify package function from the following? 1. Error-Code 2. Break 3. Call 4. Error-text 5. Form-failure 6. Form-fatal 7. Execute-query 8. Anchor_View 9. Message_code   1. Error_Code 2. Error_Text 3. Form_Failure 4. Form_Fatal 5. Message_Code 40. How does the command POST differs from COMMIT? Post writes data in the form to the database but does not perform database commitCommit permenently writes data in the form to the database.  41. What the PAUSE package procedure does? Pause suspends processing until the operator presses a function key 42. What package procedure is used for calling another form? Call (E.g. Call(formname) 43. What package procedure used for invoke sql *plus from sql *forms? Host (E.g. Host (sqlplus)) 44. Error_Code is a package proecdure? a. True  b. false False. 45. EXIT_FORM is a restricted package procedure? a. True  b. False True. 46. When the form is running in DEBUG mode, If you want to examine the values of global variables and other form variables, What package procedure command you would use in your trigger text? Break. SYSTEM VARIABLES 47. List the system variables related in Block and Field?  1. System.block_status 2. System.current_block 3. System.current_field 4. System.current_value 5. System.cursor_block 6. System.cursor_field 7. System.field_status. 48.  What  is  the  difference  between  system.current_field  and system.cursor_field? 1. System.current_field gives name of the field.  2. System.cursor_field gives name of the field with block name. 49. The value recorded in system.last_record variable is of type a. Number b. Boolean c. Character.b. Boolean. User Exits: 50. What is an User Exits? A user exit is a subroutine which are written in programming languages using pro*C pro *Cobol , etc., that link into the SQL * forms executable. 51. What are the type of User Exits? ORACLE Precompliers user exitsOCI (ORACLE Call Interface)Non-ORACEL user exits. Page: 52. What do you mean by a page? Pages are collection of display information, such as constant text and graphics. 53. How many pages you can in a single form? Unlimited. 54. Two popup pages can appear on the screen at a time? a. True  b. False  a. True. 55.What is the significance of PAGE 0 in forms 3.0? Hide the fields for internal calculation. 56. Deleting a page removes information about all the fields in that page? a. True. b. False a. True. Popup Window: 57. What do you mean by a pop-up window? Pop-up windows are screen areas that overlay all or a portion of thedisplay screen when a form is running. 58. What are the types of Pop-up window? the pop-up field editor  pop-up list of values  pop-up pages. Alert: 59. What is an Alert? An alert is window that appears in the middle of the screen overlaying a portion of the current display.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-5668880364644049758?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/5668880364644049758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=5668880364644049758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/5668880364644049758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/5668880364644049758'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/forms-3.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-8427497510838788687</id><published>2008-04-30T04:27:00.000-03:00</published><updated>2008-04-30T04:29:10.792-03:00</updated><title type='text'></title><content type='html'>Forms 4.5&lt;br /&gt;&lt;br /&gt;1.     Which triggers are created when master -detail relation? master delete property&lt;br /&gt;NON-ISOLATED (default): on check delete master, on clear details, on populate details&lt;br /&gt;      ISOLATED: on clear details, on populate details&lt;br /&gt;      CASCADE: per-delete, on clear details, on populate details.&lt;br /&gt;&lt;br /&gt;2.     Which system variables can be set by users?&lt;br /&gt;SYSTEM.MESSAGE_LEVEL&lt;br /&gt;SYSTEM.DATE_THRESHOLD&lt;br /&gt;SYSTEM.EFFECTIVE_DATE&lt;br /&gt;SYSTEM.SUPPRESS_WORKING&lt;br /&gt;&lt;br /&gt;3.     What are object group?&lt;br /&gt;An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module.&lt;br /&gt;&lt;br /&gt;4.     What are referenced objects?&lt;br /&gt;Referencing allows you to create objects that inherit their functionality and appearance from other objects.   Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.&lt;br /&gt;&lt;br /&gt;5.     Can you store objects in library?&lt;br /&gt;NO&lt;br /&gt;&lt;br /&gt;6.     Is forms 4.5 object oriented tool? Why?&lt;br /&gt;Yes, partially. 1) PROPERTY CLASS - inheritance property&lt;br /&gt;                       2) OVERLOADING:  procedures and functions.&lt;br /&gt;&lt;br /&gt;7.     Can you issue DDL in forms?&lt;br /&gt;Yes, but you have to use FORMS_DDL.&lt;br /&gt;&lt;br /&gt;Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.&lt;br /&gt;Any string expression up to 32K:&lt;br /&gt;·    a literal&lt;br /&gt;·  an expression or a variable representing the text of a block of dynamically created&lt;br /&gt;          PL/SQL code&lt;br /&gt;·  a DML statement or ·  a DDL statement&lt;br /&gt;Restrictions:&lt;br /&gt;The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. &lt;br /&gt;&lt;br /&gt;8.     What is SECURE property?&lt;br /&gt;Hides characters that the operator types into the text item.  This setting is typically used   for password protection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9.     What are the types of triggers and how the sequence of firing in text item&lt;br /&gt;Triggers can be classified as Key Triggers, Mouse Triggers,  Navigational Triggers.&lt;br /&gt;Key Triggers:  Key Triggers are fired as a result of Key action.&lt;br /&gt;    e.g.  Key-next-field, Key-up, Key-Down&lt;br /&gt;      Mouse Triggers:  Mouse Triggers are fired as a result of the mouse                                     navigation.&lt;br /&gt;    e.g. When-mouse-button-pressed, when-mouse-double clicked, etc&lt;br /&gt;      Navigational Triggers:  These Triggers are fired as a result of Navigation.&lt;br /&gt;                                E.g. Post-Text-item, Pre-text-item.&lt;br /&gt;      We also have event triggers like when–new-form-instance and when-new-block-instance.  &lt;br /&gt;      We cannot call restricted procedures like go_to(‘my_block.first_item’) in the Navigational  triggers But can use them in the Key-next-item.&lt;br /&gt;      The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement.  Key next will not fire unless there is a key event.&lt;br /&gt;The sequence of firing in a text item are as follows:&lt;br /&gt;a) pre - text&lt;br /&gt;b) when new item&lt;br /&gt;c) key-next&lt;br /&gt;d) when validate&lt;br /&gt;                   e) post text&lt;br /&gt;&lt;br /&gt;10.            What are property classes? Can property classes have trigger?&lt;br /&gt;Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly.  By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class.&lt;br /&gt;&lt;br /&gt;Yes, all type of triggers.&lt;br /&gt;&lt;br /&gt;11.            If you have property class attached to an item and you have same trigger written for the item.  Which will fire first?&lt;br /&gt;Item level trigger fires, if item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.&lt;br /&gt;&lt;br /&gt;12.            What are record groups? * Can record groups created at run-time?&lt;br /&gt;A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table.  However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined.  A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K.  Record group column names cannot exceed 30 characters.  Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable.&lt;br /&gt;TYPES OF RECORD GROUP:&lt;br /&gt;Query Record Group:    A query record group is a record group that has an associated SELECT statement.  The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement.  The records in a query record group are the rows retrieved by the query associated with that record group.&lt;br /&gt;Non-query Record Group: A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime. &lt;br /&gt;Static Record Group:    A static record group is not associated with a query; rather, you define its structure and row values at design time, and they remain fixed at    runtime.&lt;br /&gt;&lt;br /&gt;13.            What are ALERT?&lt;br /&gt;An ALERT is a modal window that displays a message notifying operator of some application condition.&lt;br /&gt;&lt;br /&gt;14.            Can a button have icon and label at the same time? NO&lt;br /&gt;&lt;br /&gt;15.            What is mouse navigate property of button?&lt;br /&gt;When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. &lt;br /&gt;When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.&lt;br /&gt;&lt;br /&gt;16.            What is FORMS_MDI_WINDOW?&lt;br /&gt;Forms run inside the MDI application window.   This property is useful for calling a form from another one.   &lt;br /&gt;&lt;br /&gt;17.            What are timers? When  when-timer-expired does not fire?&lt;br /&gt;The When-Timer-Expired trigger cannot fire during trigger, navigation, or transaction processing.&lt;br /&gt;&lt;br /&gt;18.            Can object group have a block?&lt;br /&gt;       Yes, object group can have block as well as program units.&lt;br /&gt;&lt;br /&gt;19.            How many types of canvases are there.&lt;br /&gt;There are 2 types of canvases called as Content and Stack Canvas.&lt;br /&gt;Content canvas is the default and the one that is used mostly for giving the base effect. It’s like a plate on which we add items.&lt;br /&gt;Stacked canvas is used for giving 3 dimensional effects.&lt;br /&gt; &lt;br /&gt;20.            What are user-exits?&lt;br /&gt;It invokes 3GL programs.&lt;br /&gt;&lt;br /&gt;21.            Can you pass values to-and-fro from foreign function? how?&lt;br /&gt;Yes. You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item.  Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function.  After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function.  The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface. &lt;br /&gt;&lt;br /&gt;22.            What is IAPXTB structure?&lt;br /&gt;The entries of Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB table in d/b.&lt;br /&gt;&lt;br /&gt;23.            Can you call WIN-SDK thru' user exits?&lt;br /&gt;YES.&lt;br /&gt;&lt;br /&gt;24.            Does user exits supports DLL on MS-WINDOWS?&lt;br /&gt;YES.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;25.            What is path setting for DLL?&lt;br /&gt;Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL.  If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL.&lt;br /&gt;&lt;br /&gt;26.            How is mapping of name of DLL and function done?&lt;br /&gt;The DLL can be created using the Visual C++ / Visual Basic Tools and then the DLL is put in the path that is defined the registry.&lt;br /&gt;&lt;br /&gt;27.            What is pre-compiler?&lt;br /&gt;It is similar to C pre-compiler directives.&lt;br /&gt;&lt;br /&gt;28.            Can you connect to non - oracle data source? How?&lt;br /&gt;Yes. &lt;br /&gt;&lt;br /&gt;29.            What are key-mode and locking mode properties? level?&lt;br /&gt;Key Mode Property: Specifies how oracle forms uniquely identifies rows in the database.  This property includes for application that will run against NON-ORACLE data sources .&lt;br /&gt;Level   Key setting&lt;br /&gt;      unique (default.)&lt;br /&gt;      dateable&lt;br /&gt;      n-updateable.&lt;br /&gt;Locking mode Property:&lt;br /&gt;Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form.&lt;br /&gt;Level   a) immediate&lt;br /&gt;      b) delayed&lt;br /&gt;&lt;br /&gt;30.            What are save point mode and cursor mode properties? level?&lt;br /&gt;Save Point Mode:  Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily  for applications that will run against non-ORACLE data sources.   For applications that will run against ORACLE, use the default setting.&lt;br /&gt;&lt;br /&gt;Cursor mode:  define cursor state across transaction&lt;br /&gt;                          Level: Open/close.&lt;br /&gt;&lt;br /&gt;31.            What is transactional trigger property?&lt;br /&gt;Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage  as transactional block.(NON-ORACLE data source) default - FALSE.&lt;br /&gt;&lt;br /&gt;32.            What is OLE automation?&lt;br /&gt;OLE automation allows an OLE server application to expose a set of commands and functions that can be invoked from an OLE container application.  OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;33.            What does invoke built-in do?&lt;br /&gt;This procedure invokes a method.&lt;br /&gt;Syntax:&lt;br /&gt;PROCEDURE OLE2.INVOKE&lt;br /&gt;(object obj_type,&lt;br /&gt;method VARCHAR2,&lt;br /&gt;list   list_type := 0);&lt;br /&gt;Parameters:&lt;br /&gt;object          Is an OLE2 Automation Object.&lt;br /&gt;method       Is a method (procedure) of the OLE2 object.&lt;br /&gt;list     Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;34.            What are OPEN_FORM, CALL_FORM, NEW_FORM? Difference?&lt;br /&gt;CALL_FORM: It calls the other form but parent remains active, when called form  completes the operation ,  it releases lock and control goes back to the calling form.  When you call a form, Oracle Forms issues a savepoint for the called form.  If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this save point.&lt;br /&gt;OPEN_FORM:  When you call a form, Oracle Forms issues a savepoint for the called form.  If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint.&lt;br /&gt;NEW_FORM: Exits the current form and enters the indicated form.  The calling form is terminated as the parent form.  If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form.  Oracle Forms releases memory (such as database cursors)       that the terminated form was using.&lt;br /&gt;Oracle Forms runs the new form with the same Runform options as the parent form.  If the parent form was a called form, Oracle Forms runs the new form with the same options as the parent form.&lt;br /&gt;&lt;br /&gt;35.            What is call form stack?&lt;br /&gt;When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack.&lt;br /&gt;&lt;br /&gt;36.            Can u port applications across the platforms? how?&lt;br /&gt;Yes we can port applications across platforms. Consider the form developed in a windows system.  The form would be generated in unix system by using f45gen my_form.fmb scott/tiger&lt;br /&gt;&lt;br /&gt;37.            What is a visual attribute?&lt;br /&gt;Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface.&lt;br /&gt;&lt;br /&gt;38.            Diff. between VAT and Property Class?  Imp&lt;br /&gt;Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties. You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically. When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;39.            Which trigger related to mouse?&lt;br /&gt;When-Mouse-Click&lt;br /&gt;When-Mouse-DoubleClick&lt;br /&gt;When-Mouse-Down&lt;br /&gt;When-Mouse-Enter&lt;br /&gt;When-Mouse-Leave&lt;br /&gt;When-Mouse-Move&lt;br /&gt;When-Mouse-Up&lt;br /&gt;&lt;br /&gt;40.            What is Current record attribute property?&lt;br /&gt;Specifies the named visual attribute used when an item is part of the current record.&lt;br /&gt;Current Record Attribute is frequently used at the block level to display the current row in a multi-record If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus changes. &lt;br /&gt;&lt;br /&gt;41.            Can u change VAT at run time?&lt;br /&gt;Yes. You can programmatically change an object's named visual attribute setting to change the font, color, and pattern of the object at runtime.&lt;br /&gt;&lt;br /&gt;42.            Can u set default font in forms?&lt;br /&gt;Yes. Change windows registry(regedit). Set form45_font to the desired font.&lt;br /&gt;&lt;br /&gt;43.            Can u have OLE objects in forms?&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;44.            Can u have VBX and OCX controls in forms?&lt;br /&gt;Yes.&lt;br /&gt;&lt;br /&gt;45.            What r the types of windows (Window style)?&lt;br /&gt; Specifies whether the window is a Document window or a Dialog window.&lt;br /&gt;&lt;br /&gt;46.            What is OLE Activation style property?&lt;br /&gt; Specifies the event that will activate the OLE containing item.&lt;br /&gt;&lt;br /&gt;47.            Can u change the mouse pointer? How?&lt;br /&gt;Yes. Specifies the mouse cursor style.  Use this property to dynamically change the shape of the cursor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Forms 6i&lt;br /&gt;&lt;br /&gt;1.     Which of the following tools assists with the formatting of items and is linked to the execution of the Data Block Wizard? &lt;br /&gt;Format Wizard &lt;br /&gt;&lt;br /&gt;2.     What is the most common trigger associated with a push button? &lt;br /&gt;WHEN_BUTTON_PRESSED &lt;br /&gt;&lt;br /&gt;3.     You are using a global variable in your application and you want to ensure that the global has been initialized before running the WHEN-NEW-FORM-INSTANCE.  You also want to make sure that you do not overwrite the current value if the global variable has a value. &lt;br /&gt;Referring to the situation above, what built-in can be used to initialize the global    variable? &lt;br /&gt;     Choice 1    SET_ITEM_PROPERTY &lt;br /&gt;     Choice 2    CREATE_VAR &lt;br /&gt;     Choice 3    DEFAULT_VALUE &lt;br /&gt;     Choice 4    INITIALIZE &lt;br /&gt;     Choice 5    COPY &lt;br /&gt;&lt;br /&gt;4.     What are Smart Triggers? &lt;br /&gt; They are templates for creating triggers &lt;br /&gt;&lt;br /&gt;5.     What is the primary purpose of PL/SQL Libraries? &lt;br /&gt;To enhance compatibility between program units &lt;br /&gt;&lt;br /&gt;6.     How do you capture an ORA error to perform exception handling on it? &lt;br /&gt;ORA-EXCEPTION &lt;br /&gt;&lt;br /&gt;7.     COPY(NAME_IN('INVENTORY.PARTNO'),'ORDERS.PARTNO'); &lt;br /&gt;&lt;br /&gt;What does the sample code above do? &lt;br /&gt;Updates :INVENTORY.PARTNO to reflect the number of parts ordered in                       ORDERS.PARTNO &lt;br /&gt;&lt;br /&gt;8.     XX denotes the forms version. For example FORMSXX_OUTPUT would be FORMS45_OUTPUT for Developer 1.6.1 and FORMS50_OUTPUT for Developer 2.1. &lt;br /&gt;Referring to the above sample. What environment variable tells Forms where to look     for all of its dependent objects like FMXs, PLLs, and MMXs? &lt;br /&gt;      FORMSXX_PATH &lt;br /&gt;    &lt;br /&gt;9.     Which of the following list items allows the user to type a choice not offered in the list? &lt;br /&gt;      Combo Box &lt;br /&gt;&lt;br /&gt;10.            Which of the following is a valid Record Group data source? &lt;br /&gt;        Multi-dimensional arrays &lt;br /&gt;&lt;br /&gt;11.            What built-in would you use to open another form in a modal window?  CALL_FORM &lt;br /&gt;&lt;br /&gt;12.            How can you control text wrapping in a multi-line display item so that the line break automatically occurs after the last complete word and continues on the next line? &lt;br /&gt;     Set the Wrap Style property to Word &lt;br /&gt;&lt;br /&gt;13.            You want to use a poplist to allow the users to select a value from the list and populate text items based on the value that is chosen.  Currently, users have to manually enter this information. &lt;br /&gt;Referring to the situation above, what trigger could you use to populate text items when the user makes a selection from the list item? &lt;br /&gt;      WHEN-NEW-ITEM-INSTANCE &lt;br /&gt;&lt;br /&gt;14.            What built-in will allow you to display that a particular line of code is firing and can be used to show the values of variables? &lt;br /&gt;      MESSAGE &lt;br /&gt;&lt;br /&gt;15.            Which button do you press to run a form from within the Form Builder environment? &lt;br /&gt;      Green Light &lt;br /&gt;&lt;br /&gt;16.            Users have requested that they be able to open another form that has a separate database connection within the same application. This will allow them to undo changes to one form without affecting the information that has been entered in the other form. &lt;br /&gt;Referring to the above situation, which of the following parameter needs to be passed while opening the new form? &lt;br /&gt;     SHARE_LIBRARY_DATA &lt;br /&gt;&lt;br /&gt;17.            Which of the following can be used to maximize the forms MDI window? &lt;br /&gt;      SET_WINDOW_PROPERTY &lt;br /&gt;&lt;br /&gt;18.            Which of the following can be used to dynamically hide or display a tab within a tab canvas? &lt;br /&gt;      SET_TAB_PAGE_PROPERTY  &lt;br /&gt;&lt;br /&gt;19.            What is the standard data source type for a data block? &lt;br /&gt;      Table &lt;br /&gt;     &lt;br /&gt;20.            You have a text item that is in a data block but is not based on the database.  You are getting an error message when querying information in that data block. &lt;br /&gt;Referring to the situation above, what property needs to be changed to tell Forms that the text item is not based on the database? &lt;br /&gt;      Data Source &lt;br /&gt;&lt;br /&gt;21.            What PL/SQL Library file format contains both source code and compiled code? &lt;br /&gt;PLL &lt;br /&gt;&lt;br /&gt;22.            You have decided to create a chart item manually. Which of the following file types can you use as a chart item? &lt;br /&gt;      OLE &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;23.            PROCEDURE testit(p_number NUMBER) IS&lt;br /&gt;BEGIN&lt;br /&gt;  IF :SYSTEM.CURSOR_RECORD &gt; p_number THEN&lt;br /&gt;    WHILE :SYSTEM.CURSOR_RECORD &gt; p_number LOOP&lt;br /&gt;      PREVIOUS_RECORD;&lt;br /&gt;    END LOOP;&lt;br /&gt;  ELSIF :SYSTEM.CURSOR_RECORD &lt; p_number THEN&lt;br /&gt;    WHILE :SYSTEM.CURSOR_RECORD &lt; p_number LOOP&lt;br /&gt;      NEXT_RECORD;&lt;br /&gt;    END LOOP;&lt;br /&gt;  ELSE NULL;&lt;br /&gt;  END IF;&lt;br /&gt;END; &lt;br /&gt;Referring to the sample code above, what built-in contains the same basic functionality as this program unit? &lt;br /&gt;SYSTEM.TRIGGER_RECORD &lt;br /&gt;&lt;br /&gt;24.            Which of the following button properties can you change to display a picture instead of a label? &lt;br /&gt;      Iconic &lt;br /&gt;&lt;br /&gt;25.            Which of the following is a surface on which you place the interface items and boilerplate objects that end users interact with when they run the form? &lt;br /&gt;        Canvas &lt;br /&gt;&lt;br /&gt;26.            DECLARE&lt;br /&gt;  group_id   RecordGroup := Find_Group('rg_data');&lt;br /&gt;  total_rows NUMBER;&lt;br /&gt;  new_row    NUMBER;&lt;br /&gt;BEGIN&lt;br /&gt;  total_rows := Get_Group_Row_Count(group_id);&lt;br /&gt;  Add_Group_Row(group_id, END_OF_GROUP);&lt;br /&gt;  new_row := total_rows + 1;&lt;br /&gt;  Set_Group_Char_Cell('rg_data.col1, new_row, 'xyz company');&lt;br /&gt;  Set_Group_Char_Cell('rg_data.col2', new_row, 'district 12');&lt;br /&gt;  Set_Group_Number_Cell('rg_data.col3', new_row, 400);&lt;br /&gt;END; &lt;br /&gt;What does the sample code above do? &lt;br /&gt;Inserts a row of data into the Record Group &lt;br /&gt;&lt;br /&gt;27.            You created your form and laid out the items in a frame.  You decide to remove one item, add two others, show the items in a tabular format, change the number of rows displayed from 1 to 10, and add a vertical scrollbar. &lt;br /&gt;Referring to the situation above, which of the following tools can you use to make these changes with minimal effort? &lt;br /&gt; Layout Formatting Wizard &lt;br /&gt;&lt;br /&gt;28.                                                                                                                         What is SYSTEM.CURSOR_ITEM? &lt;br /&gt;      The block.item location where focus is currently located &lt;br /&gt;&lt;br /&gt;29.            Which of the following can be set to prevent a number of system messages from being displayed? &lt;br /&gt;SYSTEM.SUPPRESS_MESSAGES &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;30.            How can you select more than one value at a time from a List of Values? &lt;br /&gt;      Hold down the CTRL button and click on the appropriate choices &lt;br /&gt;&lt;br /&gt;31.            You want to display a green circle when a record meets certain criteria and a red circle when it does not.  You have a primary application canvas and would like the circle to be displayed in the upper right corner of that canvas. &lt;br /&gt;Referring to the example above, Which of the following can be used to programmatically display the circles? &lt;br /&gt;Background &lt;br /&gt;&lt;br /&gt;32.            You want to ensure that users enter a value that is in the List of Values.  You want to display the List of Values only if the user enters a value that is not in the List of Values or if they specifically request to display it. &lt;br /&gt;      Referring to the situation above, what property would you set to get this functionality? &lt;br /&gt;List of Values Property Palette -&gt; Perform Validation &lt;br /&gt;&lt;br /&gt;33.            What are the Layout Editor buttons shown above used to do? &lt;br /&gt;To create chart objects &lt;br /&gt;&lt;br /&gt;34.            How can you enter more than one line of text in a push button? &lt;br /&gt;Press Enter between lines &lt;br /&gt;&lt;br /&gt;35.            Which of the following are NOT triggers? &lt;br /&gt;WHEN-BUTTON-PRESSED, ON-FORM-SUCCESS, ON-COMMIT &lt;br /&gt;&lt;br /&gt;36.            In the Object Navigator, what does an asterisk (*) to the right of a program unit mean? &lt;br /&gt;It needs to be compiled &lt;br /&gt;&lt;br /&gt;37.            You need to display a picture of the product for each image.  The image file is a GIF file and is stored on a network file server.  Each client system has a drive mapped to the L: drive and the images are stored in the PRODUCTS directory. &lt;br /&gt;Referring to the above situation, what would you do to incorporate this functionality into your application? &lt;br /&gt;Import every GIF file using Import Image and control, which one is displayed during runtime &lt;br /&gt;&lt;br /&gt;38.            FILE,EDIT,VIEW,FORMAT,ARRANGE,PROBLEM,TOOLS, WINDOW,HELP&lt;br /&gt;Referring to the menu selections above, which of the following menu items can be used to start the Layout Wizard? &lt;br /&gt;Tools &lt;br /&gt;&lt;br /&gt;39.            What internal Forms data structure is like a two-dimensional array?&lt;br /&gt;Record Group&lt;br /&gt;&lt;br /&gt;40.            What file type is edited in Form Builder with the Menu Editor? &lt;br /&gt; MMB &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;41.            You are using a global variable in your application and you want to ensure that the global has been initialized before running the WHEN-NEW-FORM-INSTANCE.  You also want to make sure that you do not overwrite the current value if the global variable has a value. &lt;br /&gt;Referring to the situation above, what built-in can be used to initialize the global variable? &lt;br /&gt;COPY &lt;br /&gt;&lt;br /&gt;42.            What built-in can be used to determine the name of the current form? &lt;br /&gt;GET_APPLICATION_PROPERTY &lt;br /&gt;&lt;br /&gt;43.            Which one of the following is the default validation unit? &lt;br /&gt;Item &lt;br /&gt;&lt;br /&gt;44.            Which tool can be used to make creating a master-detail relationship within the form easier? &lt;br /&gt;Data Block Wizard &lt;br /&gt;&lt;br /&gt;45.            You have received feedback from test users who say that they find the "FRM-40100: At first record" message distracting and would like to prevent it from being displayed. &lt;br /&gt;Referring to the situation above, what line of code could you add to a WHEN-NEW-FORM-INSTANCE to suppress the FRM-40100 message? &lt;br /&gt;: SYSTEM.SUPPRESS_WORKING := 'TRUE'; &lt;br /&gt;&lt;br /&gt;46.            Which of the following built-in runs a report from forms? &lt;br /&gt;RUN_PRODUCT &lt;br /&gt;&lt;br /&gt;47.            Which of the following can you use to ensure that users enter data into a text item in a specific format such as 04/07/2001? &lt;br /&gt;Format Mask &lt;br /&gt;&lt;br /&gt;48.            Why are control blocks used? &lt;br /&gt;Control blocks are required for the creation of control items such as buttons, list items, radio groups, and display items &lt;br /&gt;&lt;br /&gt;49.            Referring to the user requirements above, how would you implement this in your application? &lt;br /&gt;Add the appropriate letter in the Access Key property for the button &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.     Generating a form module compiles all of its code objects and creates .FMX runfile (True)&lt;br /&gt;2.     The forms complier component is the runtime engine that form operators use to run finished forms application (False)&lt;br /&gt;3.     Application built using Oracle forms are portable to a variety of G U I and character mode platforms (True)&lt;br /&gt;4.     The items in a block can be arranged in any order on a form and can even be displayed in different windows (True)&lt;br /&gt;5.     When you create an object, its properties are automatically set to default settings (True)&lt;br /&gt;6.     The Visual View corresponds to the oracle forms object ownership hierarchy :form-black item (false)&lt;br /&gt;7.     Each window can have multiple canvas_views and there can be multiple items on a single canvas view (True)&lt;br /&gt;8.     Objects can be copied from one module to another, but cannot be moved from one module to another (True)&lt;br /&gt;9.     A canvas_view is owned by the window in which it is displayed (false)&lt;br /&gt;10.            Boilerplate objects are not named objects and they don’t appear in the object navigator (True)&lt;br /&gt;11.            Modules can be saved to the file system or the database (True)&lt;br /&gt;12.            The .PLL library file that you work with in the builder includes both the source code required at the design time and the compiled executable code required at runtime (True)&lt;br /&gt;13.            An objects named visual attribute setting can be changed programmatically (True)&lt;br /&gt;14.            A property class cannot itself be caused on a property class (True)&lt;br /&gt;15.            Once an object is based on a class, you cannot override the setting of any inherited property (False)&lt;br /&gt;16.            Any Change you make to the source object are inherited by the reference object when you open or regenerate the module that contains the reference object (True)&lt;br /&gt;17.            When you copy an object to another module by posting from the clipboard, all object associations are lost. (True)&lt;br /&gt;18.            When you reference an object you also reference any objects owned by the object (True)&lt;br /&gt;19.            The items in a block can be placed in different canvas view and cannot be displayed in different canvas windows (false)&lt;br /&gt;20.            All though the button palette is created at the same time as the base table block it is separate control block that is functionally independent of the base table block (True).&lt;br /&gt;21.            The scope of the trigger is defined by the object to which a trigger is attached (True)&lt;br /&gt;22.            Some triggers can be defined only at a particular definition level (True)&lt;br /&gt;23.            The text of an oracle forms trigger is a named PL/SQL block (False)&lt;br /&gt;24.            Restricted built-ins is illegal in triggers that fire in response to navigation (True)&lt;br /&gt;25.            Key Triggers have one to one relationships with specific keys (True)&lt;br /&gt;26.            At any given point of time only one item in the form has the input focus (True)&lt;br /&gt;27.            The undefined state of a check-box is valid only in enter query mode (True)&lt;br /&gt;28.            A Populate_List built in subprogram adds to the contents of the current list item, the values from a record group (False)&lt;br /&gt;29.            In order to populate a list item from a record group, the record group must have two columns with type CHAR (True)&lt;br /&gt;&lt;br /&gt;30.            Operations can navigate to display items or edit display item values.&lt;br /&gt;31.            You can define a master-detail relationship only at the time of creation of the detail block. (False)&lt;br /&gt;32.            To prevent operation from performing master less operations in the detail block of the relation you must set the prevent masterless operation property to true. (True)&lt;br /&gt;33.            An alert message can be changed programmatically at runtime by executing the SET_ALERT_PROPERTY built-in procedure. (True)&lt;br /&gt;34.            If one relation in a chain of related blocks is set to deferred coordination of all subsequent blocks will also be deferred. (True)&lt;br /&gt;35.            You can specify editor attributes such as window display size, position, and title for a default editor. (False)&lt;br /&gt;36.            You must assign atleast one canvas view to each window in a form (True)&lt;br /&gt;37.            You might create a window that displays two stacked canvas view, A H toolbar canvas view (False)&lt;br /&gt;38.            V Toolbars can be displayed along the left or the right side of a window (False)&lt;br /&gt;39.            If the operator or the application scrolls the window explicitly, oracle forms does allow the item that currently has input focus to be scrolled out of the view. (True)&lt;br /&gt;40.            Windows that do not contain navigable items must always be displayed programmatically. (True)&lt;br /&gt;41.             An LOV is a modal window.  (True)&lt;br /&gt;42.            An LOV can be attached to one or more text items in the form (True)&lt;br /&gt;43.            A record group cannot be populated with an array of static values (False)&lt;br /&gt;44.            If the SELECT statement used to create a record group, the INTO clause establishes the relationship between the LOV and the return items but does not affect the definition of the resulting record group. (True)&lt;br /&gt;45.            You can set the optional LOV for validation property to have oracle forms validate the value of the text item against the values in the LOV. (True)&lt;br /&gt;46.            You cannot pass data parameters to forms.&lt;br /&gt;47.            Client memory can be conserved when displaying large image items by reducing the number of records that are buffered for the block by setting the buffered block property (True)&lt;br /&gt;48.            Global variables are not formally declared the way PL/SQL local variables are (True)&lt;br /&gt;49.            Global Variables can store CHAR,NUMBER, or DATE data types (False)&lt;br /&gt;50.            Libraries can also be attached to other libraries (True)&lt;br /&gt;51.            The default menu is form module (True)&lt;br /&gt;52.            You can se the PL/SQL menu item commands to execute operating system commands (True)&lt;br /&gt;53.            You can directly assign values to an Oracle forms object or use the copy built-in procedure (False)&lt;br /&gt;54.            Oracle forms support four types of special menu items, check, radio and separator and magic (True)&lt;br /&gt;55.            These can be more than one background menu in a menu module (False)&lt;br /&gt;56.            The initial date column in the record group used to populates a hierarchical tree determines the depth of the node in the true (false)&lt;br /&gt;57.            You can set the show play button and show record button properties to NO for a sound item control (false)&lt;br /&gt;58.            You can display total item, elapsed time and remaining time information for the sound data (true)&lt;br /&gt;59.            In-place activation is available for embedded objects, but it is not available for linked objects (true)&lt;br /&gt;60.            The built-in set-custom-item property is used to communicating with the Java components (True)&lt;br /&gt;61.            A non-Oracle foreign function cannot access Oracle database (True)&lt;br /&gt;&lt;br /&gt;62.            An operating system text file can be read using a FFI-function (True)&lt;br /&gt;63.            By Associating a PL/SQL subprogram with a foreign function you can invoke the foreign function (True)&lt;br /&gt;64.            You cannot invoke a foreign function using an user exit (False)&lt;br /&gt;65.            You can perform host language screen I/O from foreign functions (False)&lt;br /&gt;&lt;br /&gt;Questions &amp;amp; Answers&lt;br /&gt;1)     Libraries are collect of Pl/SQL Procedures &amp;amp; Functions&lt;br /&gt;2)     The interface objects that display information to user and allow then to interact with your applications are items.&lt;br /&gt;3)     The block of PL/SQL code that you attach to a specific object, and that executes in response to a specific event is called Trigger.&lt;br /&gt;4)     Which of the following are interface items supported by Oracle forms OLE Container, Image Items and VBX controls&lt;br /&gt;5)     The started application functions performed by the built-in procedures and functions in Oracle Forms are navigation, commit processing, set object properties, and Get Object properties&lt;br /&gt;6)     The components of Oracle Forms used to built applications are Forms Designer, Forms Generator and forms run-time&lt;br /&gt;7)     Items are logically grouped using Blocks and are visually grouped canvas using views&lt;br /&gt;8)     User-Named Procedures, Functions or Packages are collectively known as Program Units&lt;br /&gt;9)     PL/SQL is the language used for both client side Oracle Forms applications and server side database triggers and database triggers and procedures.&lt;br /&gt;10)            The three types of module in Oracle forms applications are Forms, menus and Libraries.&lt;br /&gt;11)            Which of the following is part of the top-level nodes in the navigator&lt;br /&gt;      Built in Packages, Database Objects and Libraries&lt;br /&gt;12)            Which of the following would invoke a property palette&lt;br /&gt;Tools&gt;Properties, Double clicking the object icon, Double Clicking the item in the layout editor.&lt;br /&gt;13)            A list of values (LOV) is a Modal window&lt;br /&gt;14)            The tool where you enter and compile code object is PL/SQL editor&lt;br /&gt;15)            The symbol that indicates that a navigator entry is collapsed is a  +(plus)&lt;br /&gt;16)            The Object Navigator provides a hierarchical display of the objects in all open modules.&lt;br /&gt;17)            You can toggle property palette synchronization on and off by clicking the freeze/unfreeze button on the property palette toolbar.&lt;br /&gt;18)            The Properties window is where you set the properties of objects you create in form and menu modules.&lt;br /&gt;19)            The Layout Editor is the graphical design facility for creating and arranging interface items and boilerplate text and graphics in form.&lt;br /&gt;20)            A window where you must either select an option or dismiss it before you can perform other operations is called a Model Window.&lt;br /&gt;21)            When an Object is inheriting from both A named visual attribute and Property Class&lt;br /&gt;22)            To undo changes that are being made to a module since the last time it was saved, select file -&gt; revert&lt;br /&gt;23)            To attach a library to a form, menu or to another library, you need only ensure that the library has been compiled and it can be located in the default run times search path.&lt;br /&gt;24)            Which of the following can be inherited from a property class Navigation Properties.&lt;br /&gt;25)            The built-in procedure which can be used to set the properties of any type of items is set_relation_property&lt;br /&gt;&lt;br /&gt;26)            If an item is inheriting visual attributes from a property class setting those attributes in layout editor overrides the inherited settings.&lt;br /&gt;27)            When you create an application with multiple modules you must deliver all of the .FMX,MMX and .PLL files required for runtime deployment.&lt;br /&gt;28)            You attach a custom menu module to a form by setting the property Menu module form property.&lt;br /&gt;29)            The Visual Attribute is the separate object in a form or menu module that defines a collection of visual attribute properties.&lt;br /&gt;30)            You can specify whether you want modules to be saved to a loaded from the file system or the database by setting the Module access design preference.&lt;br /&gt;31)            The copy object options dialogue allows you to specify whether objects that are associated with the object being copied should also be copied.&lt;br /&gt;32)            A read only text box whose value must be fetched or assigned programmatically is a display item.&lt;br /&gt;33)            Buttons and chart items are control items, hybrid items.&lt;br /&gt;34)            Which of the following triggers may be created if you select the integrity constrain when you create a base table block when-validate-item or record and when-remove-record.&lt;br /&gt;35)            In the multiple record block the items displayed prorate of an item cannot be set greater than the blocks records displayed property setting.&lt;br /&gt;36)            If you copy reference objects, the resulting object is also a preference object.&lt;br /&gt;37)            There are two type of blocks base table and control table.&lt;br /&gt;38)            The DO-KEY built in tells Oracle forms to execute the key trigger define for the function key, or if no such trigger exists execute the built in subprogram directly.&lt;br /&gt;39)            Oracle Forms displays Multiple Instances of each item in a multi record block.&lt;br /&gt;40)            Setting the Sequence ID option can specify the Position of the new block in the default block navigation sequence.&lt;br /&gt;41)            Key-Next Item is not an internal processing unit.&lt;br /&gt;42)            When an event occurs that is within the scope of more than one trigger, the trigger with the lowest definition level takes precedence.&lt;br /&gt;43)            The When-Timer-Expired trigger can be defined only at the Form Level&lt;br /&gt;44)            A user named trigger can only be executed by calling it from within a Built in Trigger, Menu Item command and User named subprogram&lt;br /&gt;45)            The sequence in which the following triggers linked to a text item are fired the sequence is Pre-Text-Item, When-new-item-instance and Post-text-Item.&lt;br /&gt;46)            Interface events can be divided into External Interface events and Internal Processing events&lt;br /&gt;47)            To call a user named trigger, use the Execute-Trigger built in procedure.&lt;br /&gt;48)            Any built in subprogram that initiates navigation is called a restricted subprogram.&lt;br /&gt;49)            DDL commands can be issued in a forms application by calling the Forms-DDL built in procedure.&lt;br /&gt;50)            The master-detail triggers generated automatically by oracle forms when you define a master-detail relationship between blocks are on-check-delete master, on clear details and on popular details.&lt;br /&gt;51)            Radio group it displays a fixed numbers of options and the options are manually exclusive&lt;br /&gt;52)            DELETE_LIST_ELEMENT and CONVERT_OTHER_VALUE built-in’s can be used to delete elements from a list item.&lt;br /&gt;53)            Record Group is an internal Oracle forms data structure&lt;br /&gt;54)            Auto Skip, Secure and Format Mark properties are apply to single-line text items.&lt;br /&gt;55)            WHEN_LIST_ACTIVATED and WHEN_LIST_CHANGED triggers can be used to respond to interface events that occur when the operator manipulates a list item.&lt;br /&gt;56)            Oracle Forms supports two button styles.  They are Text and Iconic&lt;br /&gt;&lt;br /&gt;57)            A Check box is a low state control that indicates whether a certain condition or value is on or off.&lt;br /&gt;58)            The check box other value property applies only to check box values fetched from the database or assigned programmatically at run time.&lt;br /&gt;59)            The various list styles available in oracle forms are poplist , textlist and combo box&lt;br /&gt;&lt;br /&gt;60)            You can specify that a text item accept only values that fall within a valid range by setting the range low and range high rate properties.&lt;br /&gt;61)            Isolated option for the master deletes property would allow the master record to be deleted and does not effect the associated detail records in the database.&lt;br /&gt;62)            When a coordination causing event occurs, Oracle Forms defers fetching the associated detail records until the operator navigates to the detail block, if the coordination properties deferred on auto query are set to True, False.&lt;br /&gt;63)            Either Deferred with auto query or Deferred with no auto query triggers are generated when the master deletes property is set to cascading.&lt;br /&gt;64)            SHOW_ALERT built-in subprogram is a function, it returns a numeric constant and it helps indicate which alert button the operator selected.&lt;br /&gt;65)            On-clear-details triggers are required for all master detail relations&lt;br /&gt;66)            The mechanism that oracle forms used to co-ordinate the population of the details block with the current record in the master block is the copy value from item.&lt;br /&gt;67)            An alert is a modal window that displays a message notifying the operator of some application condition.&lt;br /&gt;68)            The property of a relation which allows you to specify how the deletion of a record in the master block should affect records in the detail block is Master Deletes property.&lt;br /&gt;&lt;br /&gt;69)            The three kinds of alerts styles available in oracle forms are Stop, Caution and note.&lt;br /&gt;70)            Any event that makes a different record in the master block, the current record is a coordination causing event.&lt;br /&gt;71)            Windows which are free floating and can be moved by the operator outside the application window are called dialog window&lt;br /&gt;72)            You can replace a window’s current content view programmatically without hiding any stacked canvas-view in the window with the REPLACE_CONTENT_VIEW&lt;br /&gt;73)            SET_VIEW_PROPERTY and HIDE_VIEW procedures can be used to hide a view programmatically&lt;br /&gt;74)            During navigation Oracle forms raises the canvas-view only if the target item is hidden behind another canvas-view in the same window if Raise on Entry is false&lt;br /&gt;75)            Remove on Exit and V/H Scroll bar properties are not valid for a modal dialog window.&lt;br /&gt;76)            Canvas View are the background objects on which you place the interface items and boilerplate objects that operators interact with as they run your form.&lt;br /&gt;77)            The four types of canvas view are content, stacked, vertical and Horizontal toolbar&lt;br /&gt;78)            The MDI-Application window is created by the window manager at runtime, and does not appear in the forms list of windows.&lt;br /&gt;79)            To specify whether a modeless window should remain displayed when the operator navigates to another window you can set the remove on ext property.&lt;br /&gt;80)            You can designate a primary canvas view for a window by setting the optional view property.&lt;br /&gt;81)            An Item in the current form, A global variable and A from parameter qualify as on LOV return item&lt;br /&gt;82)            The built-in subprograms which can be used to display an LOV programmatically at runtime are LIST_VALUES and SHOW_LOV.&lt;br /&gt;83)            A record group whose structure and row values are defined of design time and remain fixed at runtime is a Static Record Group&lt;br /&gt;&lt;br /&gt;84)            ADD_GROUP_COLUMN built in subprogram cannot be used with a record group creates of design time.&lt;br /&gt;85)            GET_GROUP_ROW_COUNT built-in functions can be used to find the number of rows in a record group.&lt;br /&gt;86)            At runtime, Oracle forms displays the &lt;list&gt; LAMP on the status line whenever an LOV is available.&lt;br /&gt;87)            LOV values are derived from an internal data structure called a Record Group.&lt;br /&gt;88)            Operators can use the LOV Auto Reduction and search features to locate a value in a list.&lt;br /&gt;89)            A hidden column is any column that was included in the LOV structure but whose value are not displayed in the LOV window.&lt;br /&gt;90)            To specify the record group columns, which are to be, included in the LOV structure you set the column mapping property.&lt;br /&gt;91)            To scale image that are larger than the image item border to fill within the image item set sizing style (adjust)&lt;br /&gt;92)            You can assign a value to the system variables are SYSTEM.MESSAGE_LEVEL and SYSTEM.SUPRESS_WORKING&lt;br /&gt;93)            Form bind variable like system and global variable are always outside the scope of Library modules&lt;br /&gt;94)            Attached libraries are read only&lt;br /&gt;95)            The field in the attach dialog used to attach libraries, which specifies where oracle forms should look for the library file (the database/file system/both form&lt;br /&gt;96)            Parameter list is a named programmatic construct that is simply a list of parameter names and their values.&lt;br /&gt;97)            A parameter you include in a parameter list can be either a text parameter or a date parameter.&lt;br /&gt;98)            The READ IMAGE-FILE built-in subprogram procedure can be used to get an image from the file system.&lt;br /&gt;99)            To destroy a global variable and release its memory, use erase built-in procedure&lt;br /&gt;100)       A built-in allows you to reuse code without having to entire it in multiple triggers&lt;br /&gt;101)       Menu Items name must follow the PL/SQL naming conventions.&lt;br /&gt;102)       The command type property for a menu item having submenus is Menu.&lt;br /&gt;103)       The built-in substitution parameters UN in Oracle forms stands for current User name.&lt;br /&gt;104)       You must explicitly invoke the enter parameter values dialog when you reference a substitution parameter in a PL/SQL type menu item command by calling the built-in APPLICATION_PARAMETER and QUERY_PARAMETER.&lt;br /&gt;105)       Which of the following built-in subprograms apply only to a full-screen menus BACKGROUND_MENU and SHOW_BLACKGROUND_MENU&lt;br /&gt;106)        Menudif.mmb is the menu module library file for the default menu that ships with oracle forms.&lt;br /&gt;107)       Menus can be created in Pull down, full screen and bar style display styles&lt;br /&gt;108)       The run-product built-in procedure can be called form a PL/SQL menu item command to invoke Oracle forms run form, Oracle reports Oracle graphics&lt;br /&gt;109)          In a menu module the value of an oracle forms object is determined using the name-in built-in function.&lt;br /&gt;You can populate a hierarchical tree with values contained in A record group &amp;amp;  query Text.&lt;br /&gt;110)       The order of the triggers are fired is When-Tree-Node-Select , When-Tree-Node-Activated.&lt;br /&gt;111)       The default format in which the sound item will be stored is WAVE&lt;br /&gt;112)       For a java bean to work with a form, the wrapper’s class definitations must extent   the Vbean class&lt;br /&gt;113)       You an override any method by using Set Property &amp;amp; Get property&lt;br /&gt;114)       All the built-ins related to a Hierarchical tree are located in the FTREE built-in  package&lt;br /&gt;115)       If you plan to store data in the database, reduce the effect on network performance by setting the Update change Columns property to yes for the second items block.&lt;br /&gt;116)       An ActiveX is stand alone software component that provides a user interface and sends events to clients all according to the standards defined by COM&lt;br /&gt;117)       Form builder displays the imported methods for ActiveX controls under the Program Units node in the object navigator&lt;br /&gt;118)          The Java Bean container sends events to the server via the custom listener, which follows the standard a not event mechanism.&lt;br /&gt;119)       Foreign functions can interact with Oracle Database &amp;amp; form variables&lt;br /&gt;120)       FFI does not support you to write programs with one of the languages(Basic)&lt;br /&gt;121)       To initialize a  foreign function you cannot use on the function&lt;br /&gt;             ORA_FFI.PRAGMA_REFERENCE&lt;br /&gt;122)       The PRAGMA statement invokes foreign function by passing control to the memory location in forms builder that can communicate with DLL&lt;br /&gt;123)       The invoice foreign functions from a PL/SQL interface you should use API&lt;br /&gt;124)       Float type arguments should be converted to double&lt;br /&gt;125)       Foreign functions invoked from PL/SQL must be contained in DLL&lt;br /&gt;126)       The ORA_FFI package provides an foreign function for invoking c functions in dynamic library&lt;br /&gt;127)       Initializing a foreign functions identifies the dynamic libraries&lt;br /&gt;128)       Foreign functions are subprograms written in 3GL programming language&lt;br /&gt;129)       The three levels of the standard pull-down menu are main, individual and   submenu.&lt;br /&gt;131)       Can an oracle forms fmx be moved from windows to unix&lt;br /&gt;FMX files are operating system dependent. FMB's are not. So, you have to regenerate them whenever you change the OS or the Version of Developer 2000 etc.&lt;br /&gt;132)       How to suppress or customize the error messages in Oracle Forms&lt;br /&gt;You can either set the message level using the system variable SYSTEM.MESSAGE_LEVEL or trap the errors using the ON-ERROR or ON-MESSAGE triggers.&lt;br /&gt;&lt;br /&gt;133)       How can I execute Operating System commands in Forms&lt;br /&gt;You can use the HOST command to shell out to the operating system to run an executable, batch script or os command.  you can also go about the hard way and implement it using dbms_pipe to a stored procedure that can execute an external procedure&lt;br /&gt;&lt;br /&gt;134)       why doesn't my Messages do not show on the screen?&lt;br /&gt;This is because messages are displayed asynchronously. To display messages immediately, use the&lt;br /&gt;SYNCHRONIZE build-in:&lt;br /&gt;                           message('...'); synchronize;&lt;br /&gt;&lt;br /&gt;This can also be used to execute a query while the user is looking at the results of a previous query.&lt;br /&gt;135)       How can we iterate through items in a specified block?&lt;br /&gt;Use the following code&lt;br /&gt;Ship := TO_NUMBER(:System.Trigger_Record);&lt;br /&gt;First_Record;&lt;br /&gt;&lt;br /&gt;LOOP&lt;br /&gt;-- do processing&lt;br /&gt;IF (:System.Last_Record = 'TRUE') THEN&lt;br /&gt;Go_Record(Ship);&lt;br /&gt;EXIT;&lt;br /&gt;ELSE&lt;br /&gt;Next_Record;&lt;br /&gt;END IF;&lt;br /&gt;END LOOP&lt;br /&gt;136)       How can I create a custom tool bar?&lt;br /&gt;Create a new block, let's name it "TOOLBAR" and a canvas named "C_TOOLBAR" (for illustration purposes). Put some iconic buttons on your canvas. Use the following properties for these buttons:&lt;br /&gt;&lt;br /&gt;Enabled: True&lt;br /&gt;Navigable: False&lt;br /&gt;Mouse Navigate: False&lt;br /&gt;Now set the "Canvas Type" in the canvas property palette to "Horizontal Toolbar" and the "Form&lt;br /&gt;Horizontal Toolbar Canvas" in the module property palette to your canvas name (C_TOOLBAR in our case).&lt;br /&gt;&lt;br /&gt;137)       How can I minimise/maximise a window in forms?&lt;br /&gt;You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window.&lt;br /&gt;&lt;br /&gt;Examples:&lt;br /&gt;set_window_property(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE);&lt;br /&gt;set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15);&lt;br /&gt;       set_window_property('my_window',WINDOW_STATE,MAXIMIZE);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;138)       What happened to the Sql menu from Forms V4.5?&lt;br /&gt;&lt;br /&gt;From Forms V4.5, SQL*Menu is fully integrated into Oracle Forms. Application menus can be created by creating Menu Modules (*.MMB) and generate it to Menu Module Executables (*.MMX).&lt;br /&gt;&lt;br /&gt;139)       How can we issue DDL statements through forms?&lt;br /&gt;&lt;br /&gt;DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because Forms are not suppose to manipulate the database structure.  &lt;br /&gt;&lt;br /&gt;A statement like CREATE TABLE My_table (Ship_id number); will result in error:&lt;br /&gt;&lt;br /&gt;Encountered the symbol "CREATE" which is a reserved word.  However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:&lt;br /&gt;&lt;br /&gt;FORMS_DDL('CREATE TABLE my_table (ship_id NUMBER)'&lt;br /&gt;&lt;br /&gt;140)       How can I read/write OS files from forms?&lt;br /&gt;&lt;br /&gt;OS files can be read/written from Forms using the TEXT_IO package in Forms. The TEXT_IO package has a datatype FILE_HANDLE.  It also has procedures FCLOSE, GET_LINE, NEW_LINE, PUT, PUT_LINE &amp;amp; PUTF and&lt;br /&gt;a function FOPEN. Example:&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;file1 TEXT_IO.FILE_TYPE;&lt;br /&gt;file2 TEXT_IO.FILE_TYPE;&lt;br /&gt;str VARCHAR2(80);&lt;br /&gt;BEGIN&lt;br /&gt;file1 := TEXT_IO.FOPEN ( 'input.txt','r' );&lt;br /&gt;file2 := TEXT_IO.FOPEN( 'output.txt', 'w' );&lt;br /&gt;TEXT_IO.GET_LINE( file1, str );&lt;br /&gt;TEXT_IO.PUT_LINE( file2, str );&lt;br /&gt;TEXT_IO.FCLOSE( file1 );&lt;br /&gt;TEXT_IO.FCLOSE( file2 );&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;141)       What should I do when Forms does not allow me to use restricted built-in's?&lt;br /&gt;&lt;br /&gt;1. Create a TIMER at the point where you want the navigation to occur. Eg. create_timer('TIMER_Y', 5, NO_REPEAT);&lt;br /&gt;&lt;br /&gt;2. Code a WHEN-TIMER-EXPIRED trigger to handle the navigation&lt;br /&gt;&lt;br /&gt;DECLARE&lt;br /&gt;tm_name VARCHAR2(20);&lt;br /&gt;BEGIN&lt;br /&gt;tm_name := Get_Application_Property(TIMER_NAME);&lt;br /&gt;IF tm_name = 'TIMER_y' THEN&lt;br /&gt;Go_Item('ITEM_y');&lt;br /&gt;END IF;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;142)       Can I execute dynamic SQL from Forms?&lt;br /&gt;&lt;br /&gt;Use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms.&lt;br /&gt;&lt;br /&gt;Ex: FORMS_DDL('INSERT INTO Y VALUES ('  col_list  ')');&lt;br /&gt;Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms&lt;br /&gt;COMMIT mechanism.&lt;br /&gt;&lt;br /&gt;143)       How can I generate all my forms in a batch?&lt;br /&gt;&lt;br /&gt;@echo off&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.  FMXGNALL.BAT&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.&lt;br /&gt;@echo.  Create runtime FMXs from source FMBs&lt;br /&gt;@echo.  Will convert ALL of the fmbs in the current direcotry&lt;br /&gt;@echo.  Usage : FMXALL.BAT username/password@connect string&lt;br /&gt;@echo.&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.&lt;br /&gt;@echo. Username/Password@connect_string = %1&lt;br /&gt;@echo.&lt;br /&gt;&lt;br /&gt;IF %1 == "" GOTO END&lt;br /&gt;&lt;br /&gt;@echo Removing old FMX files&lt;br /&gt;del *.fmx&lt;br /&gt;&lt;br /&gt;@echo Creating the new FMX files&lt;br /&gt;rem Change f45gen32 to f45gen if in 16 bit environment.&lt;br /&gt;FOR %%F in (*.fmb) DO start /w f45gen32 userid=%1 batch=y module=%%F&lt;br /&gt;&lt;br /&gt;@echo.&lt;br /&gt;@echo Done!!! Remember to move the FMX files into your runtime directory.&lt;br /&gt;@echo.&lt;br /&gt;&lt;br /&gt;:END&lt;br /&gt;&lt;br /&gt;144)       How can I run a form on Unix?&lt;br /&gt;&lt;br /&gt;You need to design your form on your workstation. FTP or copy the Forms's FMB file to the Unix box.   If you generate for a terminal environment (character based), the syntax is:&lt;br /&gt;&lt;br /&gt;f45gen USERID=userid/passwd@db_name MODULE_TYPE=FORM MODULE=module_name&lt;br /&gt;&lt;br /&gt;If you want to generate a Library file, replace FORM with LIBRARY. Use f45genm to generate your form in a Motif environment.&lt;br /&gt;&lt;br /&gt;Use the "f45run" command to run your form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;145)       How can I change the mouse pointer in forms?&lt;br /&gt;&lt;br /&gt;The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow you to change the mouse pointer.&lt;br /&gt;&lt;br /&gt;Ex:  SET_APPLICATION_PROPERTY(CURSOR_STYLE, BUSY);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;146)       Can you tell me a more easier way to put repeating frame around some fields?&lt;br /&gt;&lt;br /&gt;You have two options. First, you can place the new repeating frame in the correct place and then use the techniques shown above in the "I moved this field but am still getting a frequency error" to reassign the fields into the new frame. There is also a second choice (which can also be used as a solution to the above). Go ahead and draw the new frame around the fields you want to have placed in it. Now if you try to click on one of the fields you will not be able to as they are fully covered by the new frame. Now go to the "Arrange" menu. You will find the options Send to back, bring to front, move forwards, move backwards. These are used to alter an object position in the Reports layer ordering. You use the "send backwards" option to move the frame backwards until all of the fields have popped to the front and are now enclosed in it. Oracle reassigns the new repeating frame as each object's parent as they pop to the front.&lt;br /&gt;&lt;br /&gt;Note that you can only move an object back and forth amongst it's siblings. You cannot set it back below it's parent, nor in front of it's children. This means that once an object has popped to the front and had a reassignment of parent, you cannot move it back using these tools.&lt;br /&gt;&lt;br /&gt;147)       what is a schema?&lt;br /&gt;It is a logical grouping of database objects based on the user that owns the object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                               REPORTS&lt;br /&gt;&lt;br /&gt;1.     Though I set the page size to 11x8.5, but the printer still prints in portrait?&lt;br /&gt;&lt;br /&gt;There is another variable in the system parameters section under the data model in the object navigator called orientation. This sets the printer orientation. Oracle starts by setting it to "default" which means that no matter how you set the page size, the user's default printer setup will be used. You can also set it to either "Landscape" or "Portrait" to force the printer orientation no matter what the user has set as default.&lt;br /&gt;&lt;br /&gt;2.     Though I moved a field into that repeating frame, but I'm still getting a "frequency below it's group" error?&lt;br /&gt;&lt;br /&gt;Moving fields around does not change what enclosing object is considered it's parent group. Oracle carefully remembers what repeating frame a field was originally placed in and assigns that as it's parent. If you then reference a column further down the line of the query structure it will return that error. If you are not exactly sure which repeating frame a field belongs to, try dragging it out of all of them. Whichever frame will not allow it to escape is it's parent. To change a field's parent, first click on the lock button on the speed button bar. It should now look like an unlocked padlock. Now all of the fields on the layout can be repositioned regardless of their original parent items. When you are satisfied with the repositioning click the lock button again to lock the layout. Oracle will parse the layout and assumes that any item fully enclosed in a repeating frame is a child object of that frame. This can be confirmed again by trying to drag an object out of it's parent. (Cntrl - Z or edit..undo will put it back where it came from) Sometimes, for unknown and mysterious reasons, this method does not work. The alternative in this case is to highlight the field (or fields), cut it (cntrl-x), and then paste it into the desired frame. The paste does not initially set it into the right frame, but if you drag and drop it there before clicking on any other objects, and then click on something else, Oracle will usually figure what your intent was and assign the object(s) as a child of that frame. This is my preferred method of changing a field's parent as it works much more consistently then the unlock/lock method. One note though, if you are reassigning a group of fields, make sure the frame you are going to move them into is large enough to accept the whole group at once before you do the cut/paste. If you do the paste and then try to grow the frame to fit, you will have to cut and paste again. Once you de-select an object that has just been pasted, Oracle will assign it as a child of whatever it is in at the time. If this technique also fails, you are probably going to have to delete and then recreate the objects within the desired frame. If the object has triggers attached, save yourself some typing by creating the new object in the right frame, copying over the trigger code, and then deleting the old object .&lt;br /&gt;&lt;br /&gt;3.     Only a part of the row goes to the next page and not all of it, Why is it so?&lt;br /&gt;&lt;br /&gt;This is due to the way the scan works when Oracle is parsing the layout. If the tops of all the fields in a row are aligned and the fields are all of the same height and font, they should all stay together. I suspect, however, that Reports bases it's decision on the printed size rather than the field size you define to determine which objects are too large and must be shifted to the next page. This means that even if you set two fields top-aligned with the same height and font but one of them is bolded, the bolded field could get shifted to the next page due to it's bigger footprint. The solution is to put the whole row into a regular frame which is page protected .&lt;br /&gt;&lt;br /&gt;4.     What does the 'Print condition' do?&lt;br /&gt;&lt;br /&gt;The print condition types First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame&lt;br /&gt;&lt;br /&gt;5.     Can I highlight and change all the format masks and print conditions of a bunch of fields all at once?&lt;br /&gt;&lt;br /&gt;You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.&lt;br /&gt;&lt;br /&gt;6.     How do I change the printed value of a field at runtime?&lt;br /&gt;&lt;br /&gt;Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value. That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure. The syntax is SRW.Set_Field_char(0,) and the output of the object that the current trigger is attached to will be replaced by . There are also SRW.set_fileld_num, and SRW.set_field_date for numeric or date fields.  While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totals.&lt;br /&gt;&lt;br /&gt;7.     The data modal defines only data and its hierarchy (True)&lt;br /&gt;&lt;br /&gt;8.     Oracle reports create one database column for each column/expression in the select list of a query (True)&lt;br /&gt;&lt;br /&gt;9.     You cannot create your own columns to perform computations (false)&lt;br /&gt;&lt;br /&gt;10.            Master / detail data models are very similar to break report data models (True)&lt;br /&gt;&lt;br /&gt;11.            Queries are generally linked via a common column (True)&lt;br /&gt;&lt;br /&gt;12.            Oracle reports window displays report output is Previews&lt;br /&gt;&lt;br /&gt;13.            A layout editor used fasten edge of one object to an edge of another object ensuring that they maintain their relative position is a Anchor&lt;br /&gt;&lt;br /&gt;14.            Product control break report, Product matrix reports, Summarize data at intermediate levels&lt;br /&gt;&lt;br /&gt;15.            A column whose value you set via formula columns is Placeholder column&lt;br /&gt;&lt;br /&gt;16.            The system parameter which refers to the type of device to which to send the report output is DESTYPE&lt;br /&gt;&lt;br /&gt;17.            External Queries, PL/SQL Libraries and Reports are three types of modules in Oracle reports&lt;br /&gt;&lt;br /&gt;18.            A data module object used to define a master/detail relationship between a group and a query is called a data link.&lt;br /&gt;&lt;br /&gt;19.            The file extension .rdf stands for Report definition file&lt;br /&gt;&lt;br /&gt;20.            There are two types of parameters system and user-created&lt;br /&gt;&lt;br /&gt;21.            A Break report data model is created using one-query and at least two groups.&lt;br /&gt;&lt;br /&gt;22.            Repeated frames can enclose, or surround, and layout object, excluding other repeating frames (false)&lt;br /&gt;&lt;br /&gt;23.            Frames do not have print direction, as do repeating frames (True)&lt;br /&gt;&lt;br /&gt;24.            You cannot create additional default layouts without disturbing the existing one in the layout editors&lt;br /&gt;&lt;br /&gt;25.            Oracle reports supplies six default tabular layout styles (True)&lt;br /&gt;&lt;br /&gt;26.            Using a user-created group filter rather than a packaged filter allows you to parameterize your cutoff values (true)&lt;br /&gt;&lt;br /&gt;27.            Movement of a frame or repeating moves all objects enclosed in it, this can be overridden by switching off confine mode&lt;br /&gt;&lt;br /&gt;28.            A filter created by writing Pl/SQL code for the condition is called last filter&lt;br /&gt;&lt;br /&gt;29.            A matrix report must have at least 4 groups&lt;br /&gt;&lt;br /&gt;30.            Any processing that will affect the data retrieved by the report should be performed in which of the following triggers After form&lt;br /&gt;&lt;br /&gt;31.            SRW is an oracle reports package&lt;br /&gt;&lt;br /&gt;32.            Repeating frames print once for each record of a group and control record-level-formatting&lt;br /&gt;&lt;br /&gt;33.            Flex mode determines whether the parent object pushes to accommodate any child object being moved within it either vertically or horizontally to expand or shrink.&lt;br /&gt;&lt;br /&gt;34.            Anchors determines the relative positioning of all objects in the report output&lt;br /&gt;&lt;br /&gt;35.            There are two types of anchors Implicit and explicit anchors&lt;br /&gt;&lt;br /&gt;36.            A group filter allows you to choose which record you want to process for on group in the data model.&lt;br /&gt;&lt;br /&gt;37.            How many types of columns are there and what are they&lt;br /&gt;Formula columns : For doing mathematical calculations and returning one value&lt;br /&gt;Summary Columns : For doing summary calculations such as summations etc.&lt;br /&gt;Place holder Columns : These columns are useful for storing the value in a variable&lt;br /&gt;&lt;br /&gt;38.            Can u have more than one layout in report&lt;br /&gt;It is possible to have more than one layout in a report by using the additional   layout option in the layout editor.&lt;br /&gt;&lt;br /&gt;Can u run the report with out a parameter form&lt;br /&gt;&lt;br /&gt;Yes it is possible to run the report without parameter form by setting the PARAM value to Null&lt;br /&gt;&lt;br /&gt;39.            What is the lock option in reports layout&lt;br /&gt;By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields.&lt;br /&gt;&lt;br /&gt;40.            What is Flex&lt;br /&gt;Flex is the property of moving the related fields together by setting the flex property on&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-8427497510838788687?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/8427497510838788687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=8427497510838788687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/8427497510838788687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/8427497510838788687'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/forms-4.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-3390607846798735958</id><published>2008-04-30T04:26:00.000-03:00</published><updated>2008-04-30T04:27:43.859-03:00</updated><title type='text'></title><content type='html'>How to register a report?&lt;br /&gt;a)       Register concurrent à Program à executable&lt;br /&gt;b)       Register concurrent à program à Define&lt;br /&gt;c)       Attach it to appropriate request group security à responsibility à Request&lt;br /&gt;d)       FTP RDF in respective top/report/US&lt;br /&gt;&lt;br /&gt;2. How to CREATE a VALUE SET? What are the different types of value sets?&lt;br /&gt;Enter Application à Validation à Set&lt;br /&gt;Types of value set&lt;br /&gt;a)       Independent&lt;br /&gt;b)       Dependent&lt;br /&gt;c)       Table&lt;br /&gt;d)       Pair&lt;br /&gt;e)       SPECIAL DELIVERY translate dependent&lt;br /&gt;f)        Translatable independent&lt;br /&gt;&lt;br /&gt;3. Name few types of execution method in concurrent program executable&lt;br /&gt;a)       Oracle reports&lt;br /&gt;b)       Sql * Plus&lt;br /&gt;c)       Host&lt;br /&gt;d)       Java stored procedure&lt;br /&gt;e)       Pl/sql stored procedure&lt;br /&gt;f)        SQL * Loader&lt;br /&gt;g)       Spawned&lt;br /&gt;h)       Java CCP&lt;br /&gt;i)         Multilanguage function&lt;br /&gt;j)         Immediate&lt;br /&gt;k)       Request set stage function&lt;br /&gt;&lt;br /&gt;4. How to register a form?&lt;br /&gt;a)       Define Application à form&lt;br /&gt;b)       Define Application à function à give link to form defined in step I&lt;br /&gt;c)       Go to Application à menu à Attach function to menu&lt;br /&gt;d)       FTP from to AU_TOP, generate it and copy to respective TOP&lt;br /&gt;&lt;br /&gt;5. What are the steps to develp a form&gt;&lt;br /&gt;a)       Copy appstand.fmh, Template.FMB, required pll in local directory&lt;br /&gt;b)       Change the registry for pll path. Save template.fmb as the new form name from name and start developing the form&lt;br /&gt;c)       FTP form in AU_TOP and generate fmb using f60gen and copy.fmx in respective top/forms/us directory&lt;br /&gt;&lt;br /&gt;6. what is the use of custom.pll?&lt;br /&gt;Custom.pll is used for customizations such as form, enforcing business riles and disabling fields that are not required for site without modifying  standard apps forms.&lt;br /&gt;&lt;br /&gt;7. How to PROGRAMATICALLY submit the request?&lt;br /&gt;a)       with the help of standard API&lt;br /&gt;Find_Request. Submit_request&lt;br /&gt;8. What is request set?&lt;br /&gt;With the help of request set we can submit several requests together using multiple execution paths. Its collection of concurrent programs like reports procedures grouped together.&lt;br /&gt;&lt;br /&gt;9. What are user exists in reports? What are user exist available in apps?&lt;br /&gt;a)       A user exit is a program written and then linked in to the report builder executable user exist are written when content need to be passed from report builder to that pgm, which performs some function and then returns control to report builder.&lt;br /&gt;1.        FND SRWINIT, FND SRWEXIT, FND FORMAT_CURRENCY, FND FLEXIDVAL, FND FLEXSQL.&lt;br /&gt;10      What is the API used for file I/o operation ? or which API is used to write to request log and request output?&lt;br /&gt;a)       fnd_file.put_line (Fnd_file.log, ‘message’);&lt;br /&gt;b)       fnd_file.put_line (fnd_file.out. ‘message’);&lt;br /&gt;&lt;br /&gt;11. how do I programmatically capture application user_id?&lt;br /&gt;Fnd_profile.value (‘user_id’) or fnd_global.user_id.&lt;br /&gt;&lt;br /&gt;12. what are flexfields?&lt;br /&gt;A flexfield is a field made up of segments . each segment has a name and a set of valid values. There are two types of ff’s: key ff, DFF&lt;br /&gt;&lt;br /&gt;13. Which are the 2 parameters required to be defined when a program is registered as pl/sql stored procedure&lt;br /&gt; ERRBUF, RETCODE&lt;br /&gt;&lt;br /&gt;14. can we register executable/concurrent program programmatically then how?&lt;br /&gt;Yes we can. It can be done with standard package fnd_program, fnd_program.executable, fnd_program.register.&lt;br /&gt;&lt;br /&gt;15. what changes need to be made if a setup is changed from a single org to multi org?&lt;br /&gt;Org_id should be added as a parameter in a report and report should be run for specific org_id only&lt;br /&gt;&lt;br /&gt;16. What are sub functions? How is it different from from?&lt;br /&gt;A sub function is a securable subset of a forms functionally&lt;br /&gt;a)       forms appear in a navigator window and can be navigated to sub functions do not appear in the navigator window and cant be navigated to&lt;br /&gt;b)       forms can exist on this own sub functions can only be called by ____ embodied within a form, they cant exist on their own&lt;br /&gt;&lt;br /&gt;17. what is message dictionary?&lt;br /&gt;Message dictionary allows defining messages which can be used in application without hard coding them into forms or programs.&lt;br /&gt;&lt;br /&gt;18. What is the token in concurrent à program à parameters window?&lt;br /&gt; For a parameter in an oracle report program, they keyword is parameter specified here. The value is case sensitive for example P_CUSTOMER_NO&lt;br /&gt;&lt;br /&gt;19. What are different validation defaults types and default value in current à program à parameter window?&lt;br /&gt;a)       constant&lt;br /&gt;b)       profile&lt;br /&gt;c)       SQL statement&lt;br /&gt;d)       Segment&lt;br /&gt;&lt;br /&gt;20 I have a concurrent program that involves lot of inserts and updates on a huge basis where do I specify rollback segment etc&lt;br /&gt;                concurrent à program à session control&lt;br /&gt;&lt;br /&gt;21. How do I change the priority of my concurrent program?&lt;br /&gt;                Log on as system admin concurrent à program à program à priority, enter numerical value in this field  so it will take the request which has higher priority.&lt;br /&gt;&lt;br /&gt;22. What is incompatibility?&lt;br /&gt;                When a program or list of programs is defined as incompatible means that defined program is not compatible with incompatible program list and cant run simultaneously in same conflict domain.&lt;br /&gt;&lt;br /&gt;23. What is data group?&lt;br /&gt;                A data group defines the mapping b/w oracle applications and oracle ID’s. A data group determines oracle database accounts a responsibilities forms, concurrent programs, and reports connect to&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL /DATABASE&lt;br /&gt;1. What is the difference b/w subquery and correlated subquery?&lt;br /&gt;a)      In a normal subquery, the inner query is executed first and then the result are passed off to the parent query.&lt;br /&gt;b)      In a correlated subquery, the outer query is executed first and process each row, the subquery is using. The info supplies by the result of the outer query.&lt;br /&gt;&lt;br /&gt;2. How to delete duplicate rows from a table?&lt;br /&gt;            Delete test t1 where rowed&lt; (Select max(rowed) from test t2 where t2.col1 = t1.col and t2.col2 = t1.col1.&lt;br /&gt;&lt;br /&gt;3. what are the types of database triggers?&lt;br /&gt;             Ro. Total no of database triggers are 12. They are&lt;br /&gt;a)      Row level : once for every row affected by the triggering statement such as a trigger fired by an update statement that updates many rows.&lt;br /&gt;b)      Statement level : once for the triggering statement, no matters be many rows it affects.&lt;br /&gt;c)      Before : before triggering statement is executed.&lt;br /&gt;d)      After: After triggering statement is executed.&lt;br /&gt;e)      Instead of : triggers provider a transparent way of modifying that cant be modified through DML statement.&lt;br /&gt;&lt;br /&gt;4. what is mutating error on a table?&lt;br /&gt;            It happens when a trigger on a table tries to insert, update or ever select the table of where trigger is being executed.&lt;br /&gt;&lt;br /&gt;5. What is synonym? What is view?&lt;br /&gt;            A synonym is an alias for any table, sequence, procedure function or package. It requires no storage other than its definitions in the data dictionary.&lt;br /&gt;            A view is stored query, from one or more tables.&lt;br /&gt;&lt;br /&gt;6. What is database link?&lt;br /&gt;            A database link is a pointer that defines a one_way communication path from an oracle database server to another database server&lt;br /&gt;&lt;br /&gt;7. What is a dynamic SQL?&lt;br /&gt;            DDL statement can’t be used within PL/SQL using “Execute Immediate”&lt;br /&gt;&lt;br /&gt;8. What are set operator?&lt;br /&gt;            Set operators combine the result of two component queries into a single result queries containing set operator are called components queries&lt;br /&gt;            UNION : all rows selected by either query&lt;br /&gt;            UNION ALL : All rows selected by either query, including all duplicate&lt;br /&gt;            INTERSECT : All distinct rows selected by both queries&lt;br /&gt;            MINUS : All distinct rows selected by the first query but not the second.&lt;br /&gt;&lt;br /&gt;9, What is savepoint?&lt;br /&gt;            Savepoint are intermediate markers within the context of a transaction savepoint divide a long transaction into smaller parts we then have to option later of rolling back work performed before the current point in the transaction but after a declared savepoint within the transaction.&lt;br /&gt;&lt;br /&gt;10. What are the benefits of using package? Name few oracle supplied package&lt;br /&gt;            An entire package is loaded into memory when a procedure within the package is called for the first time. This load is completed in one operation, as opposed to the separate loads required for stand alone procedure. A package body can be replaced and recompiled without affecting the specification. Definition of procedure/variable can be private or public. For example I have 5 procedure out of 3 procedures can be used by a DBMS_SQL, DBMS_JOB, UTL_FILE.&lt;br /&gt;&lt;br /&gt;11. What is deadlock?&lt;br /&gt;            A deadlock can occur when two or more user are waiting for data locked by each other. Deadlocks prevent some transactions from continuing to work.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REPORTS&lt;br /&gt;&lt;br /&gt;1. What is bind variable and lexical variable?&lt;br /&gt;            Bind variable in report are parameters that are referenced with a colon in front of them, for example, :P_customer_no.  This is considered a Bind reference. If you reference the same parameter proceeded by an ampersand, as &amp;amp;  p_customer_no. Then its considered to be a lexical reference. A bind paramerter can only contain one value, while a lexical parameter can replace an entire clause example order by where clause.&lt;br /&gt;&lt;br /&gt;2. What is the use of n anchor in the report?&lt;br /&gt;            Anchors are used for determining the vertical and horizontal positioning of a child object relative to its parent.&lt;br /&gt;&lt;br /&gt;3. What is placeholder column?&lt;br /&gt;            Placeholder column datatype and a value can be set in PL/SQL like reports triggers or formula column.&lt;br /&gt;&lt;br /&gt;4. What is a data link?&lt;br /&gt;            Data link relate the results of multiple queries. A data link causes the child query to be executed once for instance of its parent group.&lt;br /&gt;&lt;br /&gt;5. What are the report triggers?&lt;br /&gt;a)      Report triggers execute at specific times during the execution and formatting of your report&lt;br /&gt;b)      After parameter from trigger&lt;br /&gt;c)      After report trigger&lt;br /&gt;d)      Before parameter form trigger&lt;br /&gt;e)      Before report trigger&lt;br /&gt;f)        Between pages trigger.&lt;br /&gt;&lt;br /&gt;6. What is the validation trigger in report parameters property&lt;br /&gt;            Validation triggers are executed when parameter values are specified on the command line and when u accept the runtime parameter form. This is used for validating parameter foe example “Todate” can’t be earlier than  “from date” etc.&lt;br /&gt;&lt;br /&gt;7. What is confine mode?&lt;br /&gt;            In layout model if confine mode is on child objects can’t be moved outside their enclosing parent object and when it is off child object can be moved outside their enclosing parent objects. Toolbar it shows locks symbol.&lt;br /&gt;&lt;br /&gt;8. What is flex mode?&lt;br /&gt;            In layout model when it is on parent borders “stretch” when child object are moved against them. And when it is off parent borders remain fixed when child object are moved against them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FORMS&lt;br /&gt;&lt;br /&gt;1. What are alert in D2k forms?&lt;br /&gt;            An alert is a model window that displays a message notifying of some application condition. For example, do you want to save changes? Are you sure u want to exit? Or customer name can’t be bland ….&lt;br /&gt;&lt;br /&gt;2. What is property class?&lt;br /&gt;            A property class is an object that contains a list of properties and their settings. Other objects can be based on property class. An object based on a property class can inherit the setting of any property in the class that makes sense for that object.&lt;br /&gt;&lt;br /&gt;3. What is the difference b/w property class and visual attribute?&lt;br /&gt;            Visual attributes only for the visual properties of the item like font, color,  whereas property class is for all the possible properties of objects.&lt;br /&gt;&lt;br /&gt;4. What is an LOV?&lt;br /&gt;            LOV is a scrollable popup window that provides the use with selection list.&lt;br /&gt;&lt;br /&gt;5. What are record groups and what are its types?&lt;br /&gt;a)      A record group is an internal form builder data structure that has a column/row framework similar to a database table.&lt;br /&gt;b)      Query record group – associated select statement&lt;br /&gt;c)      Non query Record group – doesn’t have query but can be changed programmatically.&lt;br /&gt;d)      Static record group – cant be changed programmatically.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. What is restricted built_ins?&lt;br /&gt;            Any built_ins subprogram that initiates navigation is restricted. This includes subprograms that move the input focus from one item to another and those that involve database transactions. Restricted build_ins are not allowed in trigger that fire in response to internal navigation.&lt;br /&gt;&lt;br /&gt;7. What are categories of trigger?&lt;br /&gt;a)      block – processing triggers. Related to record mgmt in a block eg: when clear block.&lt;br /&gt;b)      Interface event triggers : interface event triggers fire in response to events that occur in the form interface eg: when button pressed. When  checkbox changed.&lt;br /&gt;c)      Master_detail triggers : from builder generates master/detail triggers automatically when a master/detail relation is defined b/w blocks. This is to enforce co-ordination b/w 2 blocks. For example, on clear details.&lt;br /&gt;d)      Message handling triggers :  message handling triggers fire in response to default messaging events. To trap or recover an error. Eg on_error, on_message&lt;br /&gt;e)      Navigational triggers : navigational triggers fire in response to navigational events. For instance clicking on a text item from another block eg: pre block, post text item, when new item instance.&lt;br /&gt;f)        Query_item trigger : Eg; pre query and post query&lt;br /&gt;g)      Transactional triggers : Fire in response to events that occur as a form interacts with the database. Eg: on_delete, pre_commit&lt;br /&gt;h)      Validation trigger : when form validated data in item or record e: when validate item.&lt;br /&gt;&lt;br /&gt;8. What is the sequence of events fired while cursor moves from an item from i1st block to an item in 2nd block?&lt;br /&gt;            When validate item of that item A&lt;br /&gt;            Post_text_item of A&lt;br /&gt;            When validate record&lt;br /&gt;            Post record&lt;br /&gt;            Post block&lt;br /&gt;            Pre block&lt;br /&gt;            Pre record&lt;br /&gt;            Pre text item&lt;br /&gt;            When_new_block_instance&lt;br /&gt;            When_new_Record_Instance&lt;br /&gt;            When_new_item_instance&lt;br /&gt;9. what are types of canvas?&lt;br /&gt;a)      Content : The default specifies that the canvas should occupy the entire content area of the window to which  it is assigned.&lt;br /&gt;b)      Stacked : Specifies that the canvas should be displayed in its window at the same time as the window’s content canvas. They are usually displayed programmatically and overlay some portion of the content view displayed in the same window&lt;br /&gt;c)      Vertical toolbar canvas : specifies that the canvas should be displayed as a vertical toolbar under the menu bar of the window.&lt;br /&gt;d)      Horizontal toolbar canvas : specifies that the canvas should be displayed as a horizontal toolbar at the left side of the window to which it is assigned.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. How do I attach menu to a form?&lt;br /&gt;            Form à properties à functional à menu source à File&lt;br /&gt;            Forms à Properties à functional à menu module à name of menu (main menu&lt;br /&gt;&lt;br /&gt;1. What are 2 types of data blocks object?&lt;br /&gt;a)      Data blocks : data blocks are associated with data within a database. Data blocks can be based on database table, views, procedure or transactional triggers.&lt;br /&gt;b)      Control blocks : in contrast a control block is not associated with the database and the item in or control block do not relate to table columns within a database.&lt;br /&gt;&lt;br /&gt;2. How do I dynamically change the title of window?&lt;br /&gt;a)      set_window_property built-in&lt;br /&gt;&lt;br /&gt;3. Name few system variables in forms?&lt;br /&gt;            A system  variable is a form builder variable that keeps track of an internal form builder state. For example, system.Block_status, system, mode, system.from_status.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. How to attach reports in oracle application?&lt;br /&gt;            The steps are as follows:&lt;br /&gt;a)      Design you report&lt;br /&gt;b)      Generate the executable file of the report.&lt;br /&gt;c)      Move the executable as well as source file to the appropriate products folder.&lt;br /&gt;d)      Register the report as concurrent executable&lt;br /&gt;e)      Define the concurrent program for the executable registered&lt;br /&gt;f)        Add the concurrent program to the request group of the responsibility&lt;br /&gt;&lt;br /&gt;2. What are different report triggers and what is their firing sequence?&lt;br /&gt;            There are fiver report trigger:&lt;br /&gt;a)      Before report&lt;br /&gt;b)      After report&lt;br /&gt;c)      Before parameter form&lt;br /&gt;d)      After parameter form&lt;br /&gt;e)      Between pages&lt;br /&gt;The firing sequence for report trigger is&lt;br /&gt;Before parameter form – After parameter form – before report – between pages – after report.&lt;br /&gt;&lt;br /&gt;3. What is the use of cursors in PL/SQL? What is REF Cursor?&lt;br /&gt;            The cursor is used to handle multiple row query in PL/SQL. Oracle uses implicit cursors to handle its queries. Oracle uses unnamed memory spaces to store data used in implicit cursors, with REF cursors you can define a cursor variable, which will point to that memory space and can be used like pointers in our 3GL’s&lt;br /&gt;&lt;br /&gt;4. What is record group?&lt;br /&gt;            Record group are used with LOV’s to hold SQL query for your list of values. The record group can contain static data as well it can access dates from database tables through sql queries&lt;br /&gt;________________________________________________________________________&lt;br /&gt;           &lt;br /&gt;1. What is flexfield? What are DFF&amp;amp; KFF?&lt;br /&gt;            In oracle application field made up of segments each segment has Assigned name and a set of valid values .oracle application uses flexfield to capture into about your organization&lt;br /&gt;&lt;br /&gt;2. What are Autonomous Transaction? Give Scenario where you have used Autonomous transaction In your report ?&lt;br /&gt;            An Autonomous transaction is an independent transaction started by another transaction , the main transaction ,Autonomous transaction lets you suspend the main transaction do SQL operations ,commit or rollback those operation then resume the main transaction Once started an autonomous transaction fully independent .It shares no locks ,resources .or commit dependencies with the main transaction so ,you can log events increment retry counters ,and soon even if the main transaction rolls back More important, Autonomous transaction help you build modules reusable software component . for example  Stored procedures can start and finish autonomous transaction there own .A calling application need not know about a procedures autonomous operations, and the procedures need not know about the application transaction content.&lt;br /&gt;Scenario: you can use autonomous transaction in your report for writing error message in your database  table.&lt;br /&gt;&lt;br /&gt;3. What is the use of trigger in the form?&lt;br /&gt;            Triggers are used in forms for event handling u can write PL/SQL code in trigger to respond to a particular event occurred in your forms like when user presses a button or when he commits the form&lt;br /&gt;The different types to triggers available I forms are&lt;br /&gt;            a)Key Trigger &lt;br /&gt;            b)Navigational Trigger &lt;br /&gt;            c)Transaction triggers  &lt;br /&gt;            d)Message Triggers &lt;br /&gt;            e)Error triggers &lt;br /&gt;            f)Query triggers&lt;br /&gt;&lt;br /&gt;4. What is the use of temp table and interface table ?&lt;br /&gt;            Temporary table are used in I/F programs to hold the intermediate data. The data is loaded into temporary first and then after validation through the PL/SQL program, the data is loaded into the interface table&lt;br /&gt;&lt;br /&gt;5. What are the steps to register concurrent program in APPS?&lt;br /&gt;            The steps to register the concurrent prom in APPS are follows&lt;br /&gt;            a)Register the prom as concurrent prom for the executable&lt;br /&gt;            b) Define the concurrent prom for the executable registered&lt;br /&gt;            C)Add the concurrent program to the request group of the responsibilities&lt;br /&gt;&lt;br /&gt;6. How to pass parameters to a report ? Do you have to register them with AOL?&lt;br /&gt;            U can define parameters in the define concurrent prom form there is no need to register the parameters with AOL .But you may have to register the value sets for those parameters&lt;br /&gt;Do you have to register feeder program of interface to AOL?&lt;br /&gt;Yes, U have to register the feeder program as concurrent prom to APPS&lt;br /&gt;&lt;br /&gt;7. What are the forms customization steps&lt;br /&gt;            Steps are as follows&lt;br /&gt;            a)Copy the “Template fmb”1 and “Appstand.fmb” from AU_top/Forms/us. Put it          in custom directory .&lt;br /&gt;the Libraries(FNDSQF,APPCORE,APPDAYPK,GLOBE,CUSTOM,JE,JA,VERT)are automatically attached&lt;br /&gt;b)Create/open new forms .then customise&lt;br /&gt;c)save this form in corresponding module.&lt;br /&gt;&lt;br /&gt;8. How to use flexfield In report?&lt;br /&gt;There are two ways to use flexfield in reports one is to use the views(table name+`_kfv`or `_dfv`) created by apps, and use the concatenated segment column that holds the concatenated segments of the key or descriptive flexfield&lt;br /&gt;                           (or)&lt;br /&gt;To use the FND user exits provided by apps&lt;br /&gt;&lt;br /&gt;9. what is KFF, DFF?&lt;br /&gt;KFF : # unique identifiers, storing key into # used for entering and displaying key into&lt;br /&gt;For example oracle general uses a KFF called Accounting flex field to uniquely identify a general account.&lt;br /&gt;DFF : # to capture additional info # to provide expansion space on your form with the help of []. [] represents DFF&lt;br /&gt;&lt;br /&gt;10 Difference b/w KFF and DFF&lt;br /&gt;&lt;br /&gt;KFF&lt;br /&gt;DFF&lt;br /&gt;Unique identifiers&lt;br /&gt;To capture extra info&lt;br /&gt;KFF are stored in segments&lt;br /&gt;Stored in attributes&lt;br /&gt;For KFF there are FF qualifier and segment qualifiers&lt;br /&gt;Context_sensitive ff is a feature of dff. (DFF)&lt;br /&gt;                                                           &lt;br /&gt;_______________________________________________________________________&lt;br /&gt;&lt;br /&gt;1. Will you attach reports in apps?&lt;br /&gt;2. How will you attach forms in apps?&lt;br /&gt;3. what is the use of token in reports?&lt;br /&gt;4, what are various execution methods in reports?&lt;br /&gt;5. How will you get set of books id dynamically in reports?&lt;br /&gt;            By using profile option called GL_SET_Of_Books_id&lt;br /&gt;6. How will u capture AFF in reports?&lt;br /&gt;            By using user exits&lt;br /&gt;7. What are dynamic  insertion?&lt;br /&gt;8. What is code combination Id?&lt;br /&gt;9. Custom.Pll various events in custom.PLL&lt;br /&gt;            Zoom_available, custom.standard, Custom.event.&lt;br /&gt;10. When u defined concurrent program u defined in compatibilities &lt;br /&gt;            what is the meaning of incompatibilities&lt;br /&gt;            simultaneously cant allow running programs&lt;br /&gt;11. What is hierarchy of multi_org?&lt;br /&gt;            Business groups à sob à le à operating unit à inv organisation&lt;br /&gt;&lt;br /&gt;12. What is difference b/w org_id, organisation_ID&lt;br /&gt;            ORG_ID is an operatin unit&lt;br /&gt;            Organisation_ID is inventory organisation.&lt;br /&gt;&lt;br /&gt;13. What are profile options?&lt;br /&gt;            Defines the way application behaves ( more than 200 types)&lt;br /&gt;14. Value set. And validation types&lt;br /&gt;            value set define suitable values for your segments&lt;br /&gt;            table, none, dependent, independent, special, pair&lt;br /&gt;15. What is flexfield qualifiers?&lt;br /&gt;            Additional properties for your segment&lt;br /&gt;16. What is your structure of AFF?&lt;br /&gt;17. How will u enable DFF?&lt;br /&gt;18. How many segments are in AFF?&lt;br /&gt;            Minimum, maximum&lt;br /&gt;19. What are user exits?&lt;br /&gt;20. When u defined CCP there is one checkbox use in SRS what is meaning of this suppose I do now want to call report through SRS how will I call report then?&lt;br /&gt;            SRS:= (Standard Request submission)&lt;br /&gt;21. What is difference b/w request group and data group?&lt;br /&gt;            Request group : group is set of CCP and request sets&lt;br /&gt;            Data Group : integrates all your oracle apps modules&lt;br /&gt;&lt;br /&gt;22. What is meaning of $flex $dollar&lt;br /&gt;            using this we call a value set with another value set.&lt;br /&gt;&lt;br /&gt;_______________________________________________________________________&lt;br /&gt;&lt;br /&gt;TRIGGERS:     is a Stored Procedure that is fired when a DML operation is performed.&lt;br /&gt;Types: before, after, for each row, for each statement&lt;br /&gt;Instead of Triggers: This trigger is defined on a view rather than on a table.&lt;br /&gt;&lt;br /&gt;INDEX:           It is a database object used to improve the performance of data retrieval.&lt;br /&gt;&lt;br /&gt;VIEW:             It is a virtual table based on the actual table.&lt;br /&gt;&lt;br /&gt;PACKAGE:     is a PL/SQL construct that allows related objects to be stored together. Contains package specification and body. Ex: DBMS_SQL, DBMS_JOBS&lt;br /&gt;&lt;br /&gt;FUNCTION:   is a object that takes one or more arguments and returns only one value.&lt;br /&gt;&lt;br /&gt;PROCEDURES:          Can return more than one parameters. Function always returns one value whereas procedure may or may not return a value.&lt;br /&gt;&lt;br /&gt;TYPES OF BLOCKS: 1.Anonymous 2.Named 3.Subprograms (Procedures, Functions) 4.Triggers&lt;br /&gt;&lt;br /&gt;TYPES OF TRIGGERS:&lt;br /&gt;&lt;br /&gt;      Insert ---   - Before -   -- each row&lt;br /&gt;      Update ------  After  ---&lt;br /&gt;      Delete ---   _        -   -- statement level&lt;br /&gt;&lt;br /&gt;PURITY LEVEL:         What data structure the function can read or modify is based on purity level.&lt;br /&gt;            WNDS -&gt; No Database State              WNPS -&gt; Write no package State&lt;br /&gt;&lt;br /&gt;DELETE DUPLICATE ROWS:           Delete from emp where rowid not in (select max(rowid) from emp group by empno);&lt;br /&gt;&lt;br /&gt;EXCEPTIONS:           is an identifier in PL/SQL that is raised during the execution of block that terminates its main body of actions 1.Oracle error occurs 2.User defined error&lt;br /&gt;&lt;br /&gt;PREDEFINED EXCEPTION: 1.NO_DATA_FOUND 2.TOO_MANY_ROWS 3.INVALID_CURSOR 4.ZERO_DEVIDE&lt;br /&gt;Function for trapping the user defined exception: sqlcode &amp;amp; sqlerrm&lt;br /&gt;&lt;br /&gt;USERDEFINED EXCEPTION:          sql%notfound, Raise exception&lt;br /&gt;&lt;br /&gt;            If SQL%NOTFOUND THEN&lt;br /&gt;                        RAISE APPLICATION_ERROR('Not Valid');&lt;br /&gt;            END IF;&lt;br /&gt;&lt;br /&gt;PL/SQL CURSOR:      Two types 1.Implicit 2.Explisit&lt;br /&gt;In order to execution of sql statement Oracle will allocate some memory area called as context area.&lt;br /&gt;Cursor is pointer to this context area.&lt;br /&gt;Cursor Attributes:&lt;br /&gt;%ISOPEN %ROWCOUNT %FOUND %NOTFOUND&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DIFFERENCE BETWEEN %TYPW AND %ROWTYPE:&lt;br /&gt;&lt;br /&gt;%TYPE           provides datatype of variable or a database column to that variable.&lt;br /&gt;%ROWTYPE provides record type that represents an entire row of a table or view or column selected in the cursor.&lt;br /&gt;&lt;br /&gt;PRAGMA:       Tells the compiler to associate an exception with an Oracle error.&lt;br /&gt;&lt;br /&gt;NORMALIZATION:   is the process of removing redundant data from relational tables by splitting it to smaller tanbles.&lt;br /&gt;&lt;br /&gt;DATAGROUP:            is a collection of modules which can integrate with each other through transfer reference and reporting data.&lt;br /&gt;&lt;br /&gt;SELF JOIN:     Join the table with itself.&lt;br /&gt;&lt;br /&gt;EQUI JOIN:    Joining two tables by equating two common columns.&lt;br /&gt;&lt;br /&gt;NONEQUI JOIN: Joining two tables by NOT equating two common columns.&lt;br /&gt;&lt;br /&gt;OUTER JOIN: Joining 2 tables so that the query can retrieve rows that do not have corresponding join value in the other table. (+ is included in the join)&lt;br /&gt;&lt;br /&gt;SUBQUERIES:            is a query who's return values are used in filtering condition of the main query.&lt;br /&gt;&lt;br /&gt;CORRELATED SUBQUERIES:         is a query that has the reference to the main query.&lt;br /&gt;&lt;br /&gt;INSTR: Returns the n th position.&lt;br /&gt;&lt;br /&gt;SUBSTTR: returns character.&lt;br /&gt;&lt;br /&gt;CARTESIAN: results from fault query, it is a row in the result.&lt;br /&gt;&lt;br /&gt;BIND VARIABLES: are variables to which we can pass data at runtime either character or number.&lt;br /&gt;&lt;br /&gt;COMPOSITE DATATYPES: are Table/record/nested table/varray also known as collections. And has internal components that can be manipulated individually.&lt;br /&gt;&lt;br /&gt;APPLICTIONS&lt;br /&gt;&lt;br /&gt;CONCURRENT MANAGER:            4 Types&lt;br /&gt;1.Internal Manager 2.Standard Manager 3.Conflict Resolution Manager 4.Specialized concurrent Manager.&lt;br /&gt;&lt;br /&gt;BACKEND:    FND_CONCURRENT_REQUESTS&lt;br /&gt;                        FND_CONCURRENT_PROGRAM&lt;br /&gt;&lt;br /&gt;FND_PROGRAM_REGISTER:&lt;br /&gt;---------------------&lt;br /&gt;Application Program:    Application&lt;br /&gt;Executable name:                      Name of the registered Executable&lt;br /&gt;Executable Application: Name of the app where executable ins registered.&lt;br /&gt;&lt;br /&gt;FND_PROGRAM_EXECUTABLE:&lt;br /&gt;-----------------------&lt;br /&gt;Executable Name:                     Name of the executable.&lt;br /&gt;Application:                  Name of the executable application.&lt;br /&gt;Short Name:                             Short name of the exe&lt;br /&gt;Execution Method:        'Flex Rpt' 'Flex SQL' 'Host' 'Immediate' 'Oracle Reports' 'PL/SQL stored procedure' 'Sql*loader' 'Sql*Plus' 'Sql*report'&lt;br /&gt;Execution File Name:    Regd. for all but immediate prog.&lt;br /&gt;&lt;br /&gt;FND_REQUEST.SUBMIT_REQUEST&lt;br /&gt;---------------------------&lt;br /&gt;Name:  Submit Request&lt;br /&gt;Application:      Short name for the application under which the program is registered.&lt;br /&gt;Program:          Concurrent program name for which the request has to be submitted.&lt;br /&gt;&lt;br /&gt;           &lt;br /&gt;REGISTERING TABLE:         AD_DD.REGISTER_TABLE&lt;br /&gt;                                                AD_DD.REGISTER_COLUMN&lt;br /&gt;&lt;br /&gt;CONCURRENT MANAGER:            runs concurrent process allowing multiple tasks simultaneously.&lt;br /&gt;&lt;br /&gt;CONCURRENT PROCESS:  runs simultaneously with other tasks to help complete multiple tasks at once without interruption.&lt;br /&gt;&lt;br /&gt;GENERAL AIM: AIM 10, 20, 30, 40 -&gt; DBA&lt;br /&gt;&lt;br /&gt;AIM 50 -&gt; Automatic column mapping&lt;br /&gt;AIM 60 -&gt; Manual column mapping&lt;br /&gt;AIM 70 -&gt; Default values, data assignments to be included.&lt;br /&gt;AIM 80 -&gt; Unit Testing &amp;amp; results of UAT&lt;br /&gt;AIM 90 -&gt; Coding&lt;br /&gt;&lt;br /&gt;IF -&gt; Interface, RD -&gt; Requirement Definitions, BR -&gt; Business requirement,&lt;br /&gt;MD -&gt; Module Design, CV -&gt; Conversion&lt;br /&gt;&lt;br /&gt;PROCESSING CONSTRAINTS:       Restricting particular responsibility on an entered information.&lt;br /&gt;&lt;br /&gt;PROFILE LEVEL:       1.Site 2.Application 3.User 4.Responsibility&lt;br /&gt;&lt;br /&gt;KEY FLEX FIELDS:   A flexible data field made up of segments, each segment has a name we define and a set of values that we specify.&lt;br /&gt;&lt;br /&gt;DESCRIPTIVE FLEX FIELD: A flexfield that our organization can customize to capture additional information regd. by our business.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CV 10 -&gt;         Define Conversion Scope, objectives and approach&lt;br /&gt;CV 20 -&gt;         Prepare Conversion Strategy&lt;br /&gt;CV 30 -&gt;         Prepare Conversion Standards&lt;br /&gt;CV 40 -&gt;         Prepare Conversion Statements&lt;br /&gt;CV 50 -&gt;         Perform Conversion Data Mapping&lt;br /&gt;CV 60 -&gt;         Define Manual Conversion Strategy&lt;br /&gt;CV 70 -&gt;         Design Conversion Programs&lt;br /&gt;CV 80 -&gt;         Prepare Conversion Test Plans&lt;br /&gt;CV 90 -&gt;         Develop Conversion Program&lt;br /&gt;CV 100 -&gt;       Perform Conversion Unit Test&lt;br /&gt;CV 110 -&gt;       Perform Conversion business objects Tests&lt;br /&gt;CV 120 -&gt;       Perform Conversion Integration Tests&lt;br /&gt;CV 130 -&gt;       Install Conversion Software&lt;br /&gt;CV 140 -&gt;       Convert &amp;amp; Verify Data&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FORMS&lt;br /&gt;&lt;br /&gt;Registering Forms:&lt;br /&gt;We Take Template from .fmb  table from AV_TOP/11.50/Forms/us&lt;br /&gt;CHANGE THE RESPONSIBILITY TO Application Developer&lt;br /&gt;Goto Application-Register-Register it&lt;br /&gt;Goto Application -Function Give&lt;br /&gt;Function     User Function      Give&lt;br /&gt;Click on Form Tab.&lt;br /&gt;Function        Form     Application&lt;br /&gt;Than goto Application- menu &amp;amp; give submenu function description.&lt;br /&gt;Change responsibility to&lt;br /&gt;Security- Define -User&lt;br /&gt;GLOBAL VARIABLE in forms is declared in when new forms instance&lt;br /&gt;Trigger for LOV in forms : Key-list-value&lt;br /&gt;FORM MODULES : 4 types- 1)Alerts 2)Form Modules 3)Menu modules  4) PL/SQL libraries&lt;br /&gt;Order of TRIGGER FIRING : When new form instance pre-form, when-new-block-instance, when new item interface post form&lt;br /&gt;OBJECT LIBRARY : can be used to store function, procedure, package.&lt;br /&gt;ATTACHED LIBRARY : is used to avoid any change in source code&lt;br /&gt;FORMS IN GL :&lt;br /&gt;FNDFFMDC-Descriptive Flexfield segment&lt;br /&gt;GLXSTBKS-Set of books&lt;br /&gt;GLXSTCAL-Accounting calendar&lt;br /&gt;Alert is a model window which has predefined manager&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REPORTS&lt;br /&gt;3 types of Reports-SQL,RDF,RXI&lt;br /&gt;2 Parameters in the reports - 1)user (Lexical, Bind) 2) system&lt;br /&gt;LEXICAL PARAMETERS: Are always Characters type used with the where clause used to facilitate the range parameters i.e., if the wishes to se a list of invoices between two given dates.&lt;br /&gt;DECODE : To Achieve dynamic column order or column constant, we use decode statement in reports&lt;br /&gt;FORMAT TRIGGER/ANCHOR : Allows a developer to show or hide objects using PL/SQL I the simplest form a trigger can be placed on certain columns to show or hide based on user parameters&lt;br /&gt;If two reports differ by say one col the decode statement con be used to consolidate these two reports into one&lt;br /&gt;TOKEN :For user parameters we define a token&lt;br /&gt;&lt;br /&gt;REPORT REGISTRATION :&lt;br /&gt;CUS_TOP/REPORTS?US-Object script&lt;br /&gt;GOTO Application Developer&lt;br /&gt;Concurrent -Define Executable.&lt;br /&gt;Give Execution Method -Oracle Reports&lt;br /&gt;     Executio filename&lt;br /&gt;THEN goto PROM&lt;br /&gt;Attach the executable to the Application&lt;br /&gt;Click on parameters window&lt;br /&gt;Give seq.parameters &amp;amp; Token&lt;br /&gt;Types of Reports generated-HTML,PCL,PDF&lt;br /&gt; post script, Text&amp;amp; HTML.&lt;br /&gt;CUSTOM REPORTS : Made use of PRIS(Property records information system)which is PACE existing Asset accounting system .An ASCII file will be extracted from PRIS balance after all the month end processing is done for the business period prior to conversion. All the data will be extracted from the legacy source file to load into oracle fixed Asset using interface program FA_MASS_ADDITIONS. The Table that receives data in Orapps are FA_MASS_ADITIONS FA_CATAGORIES  FA_LOCATION  FA_ASSET_KEY_WORDS. which is used to regenerate reports&lt;br /&gt;&lt;br /&gt;5TRIGGER in the reports : Before report ,After report before parameters ,After parameters form between pages.&lt;br /&gt;Before Report -SRW.USER_EXIT(FND,USER_INIT) &lt;br /&gt;After Report -SRW.USER_EXIT(FND.USER_EXIT)&lt;br /&gt;&lt;br /&gt;COLUMNS :Summary Column, Formula &amp;amp; Place holders columns&lt;br /&gt;POXPOBPS: Blanket Purchase Order Status Report.&lt;br /&gt;Parameters : PO Numbers from to&lt;br /&gt;          Buyer Name Vendors From to  &lt;br /&gt;           Sort by PO Number Or Buyer&lt;br /&gt;POXPOSTD: PO Detail Report.&lt;br /&gt;          Title, Buyer Name, Items from to&lt;br /&gt;          PO Number From to Vender&lt;br /&gt;          Status : Approved Or in process&lt;br /&gt;User Exit -A user exit is a function written in a 3rd Generation Language Like C, Cobol, FORTRAN Etc, to do special purpose processing which is linked into the SQL* Forms Executable files SQL Statements and Pl/SQL Block can be embedded into a user exit&lt;br /&gt;When the user exit gets called from the from by a SQL* from trigger, processing control is temporarily paused onto the user exit when a user exit is done, it reaches an integer value to the SQL* from which indicates success, failure or Fatal error.&lt;br /&gt;Types of Reports&lt;br /&gt;&lt;br /&gt;Tabular&lt;br /&gt;Master detail&lt;br /&gt;Form&lt;br /&gt;Mailing Label&lt;br /&gt;Matrix&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-3390607846798735958?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/3390607846798735958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=3390607846798735958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3390607846798735958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3390607846798735958'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/how-to-register-report-register.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-3751078288468439717</id><published>2008-04-30T04:24:00.000-03:00</published><updated>2008-04-30T04:26:15.541-03:00</updated><title type='text'></title><content type='html'>Important Questions in Oracle, Developer /2000(Form 4.5 and Reports 2.5)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle&lt;br /&gt;&lt;br /&gt;1) What are the Back ground processes in Oracle and what are they.&lt;br /&gt;ANS:&lt;br /&gt;        This is one of the most frequently asked question.There are basically 9 Processes but in a general system we need to mention the first five background processes.They do the house keeping activities for the Oracle and are common in any system.The various background processes in oracle are&lt;br /&gt;          a) Data Base Writer(DBWR)  ::  Data Base Writer Writes Modified blocks from Database buffer cache to Data Files.This is required since the data is not written whenever a transaction is commited.&lt;br /&gt;&lt;br /&gt;b)LogWriter(LGWR)  ::  LogWriter writes the redo log entries to disk. Redo Log data is generated in redo log buffer of SGA. As transaction commits and log buffer fills, LGWR writes log entries into a online redo log file.&lt;br /&gt;&lt;br /&gt;c) System Monitor(SMON) :: The System Monitor performs instance recovery at instance startup.This is useful for recovery from system failure&lt;br /&gt;&lt;br /&gt;d)Process Monitor(PMON) :: The Process Monitor peforms process recovery when user Process fails. Pmon Clears and Frees resources that process was using.&lt;br /&gt;&lt;br /&gt;e)  CheckPoint(CKPT) :: At Specified times, all modified database buffers in SGA are written to data files by DBWR at Checkpoints and Updating all data files and control files of database to indicate the&lt;br /&gt;most recent checkpoint&lt;br /&gt;&lt;br /&gt;f)Archieves(ARCH) :: The Archiver copies online redo log files to archival storal when they are busy.&lt;br /&gt;&lt;br /&gt;g) Recoveror(RECO) :: The Recoveror is used to resolve the distributed  transaction in network&lt;br /&gt;&lt;br /&gt;h) Dispatcher (Dnnn) :: The Dispatcher is useful in Multi Threaded Architecture&lt;br /&gt;&lt;br /&gt;i) Lckn :: We can have upto 10 lock processes for inter instance locking in parallel sql.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) How many types of Sql Statements are there in Oracle&lt;br /&gt;ANS: There are basically 6 types of sql statments.They are&lt;br /&gt;a) Data Defination Language(DDL) :: The DDL  statments define and maintain objects and drop objects.&lt;br /&gt;b) Data Manipulation Language(DML) :: The DML statments manipulate database data.&lt;br /&gt;c) Transaction Control Statements       :: Manage change by DML&lt;br /&gt;d) Session Control                                    :: Used to control the properties of current session enabling and disabling roles and changing .e.g   :: Alter Statements,Set Role&lt;br /&gt;e) System Control Statements               :: Change Properties of Oracle Instance .e.g:: Alter System&lt;br /&gt;f) Embedded Sql                                         :: Incorporate DDL,DML and T.C.S in Programming Language.e.g:: Using the Sql Statements in languages such as 'C', Open,Fetch, execute and close&lt;br /&gt;&lt;br /&gt;3) What is a Transaction in Oracle&lt;br /&gt;ANS: A transaction is a  Logical unit of work that compromises one or more SQL Statements executed by a single User. According to ANSI, a transaction begins with first executable statment and ends when it is explicitly commited or rolled back.&lt;br /&gt;&lt;br /&gt;4)  Key Words Used in Oracle&lt;br /&gt;ANS: The Key words that are used in Oracle are ::&lt;br /&gt; a) Commiting :: A transaction is said to be commited when the transaction makes permanent    changes resulting from the SQL statements.&lt;br /&gt;b)    Rollback      :: A transaction that retracts any of the changes resulting from SQL statements in Transaction.&lt;br /&gt; c)  SavePoint      :: For long transactions that contain many SQL statements, intermediate markers or savepoints are declared. Savepoints can be used to divide a transactino into smaller points.&lt;br /&gt;d)  Rolling Forward :: Process of applying  redo log during recovery is called rolling forward.&lt;br /&gt; e) Cursor                 :: A cursor is a handle ( name or a pointer) for the memory associated with a specific stament.  A cursor is basically an area allocated by Oracle for executing the Sql Statement. Oracle uses an implicit cursor statement for Single row query and Uses Explcit cursor for a multi row query.&lt;br /&gt;f) System Global Area(SGA) :: The SGA is a shared memory region allocated by the Oracle that contains Data and control information for one Oracle Instance.It consists of Database Buffer Cache and Redo log Buffer.&lt;br /&gt;g) Program Global Area (PGA) :: The PGA is a memory buffer  that contains data and control information for server process.&lt;br /&gt;g) Database Buffer Cache :: Databese Buffer of SGA stores the most recently used blocks of datatbase data.The set of database buffers in an instance is called Database Buffer Cache.&lt;br /&gt;h) Redo log Buffer   :: Redo log Buffer of SGA stores all the redo log entries.&lt;br /&gt;i) Redo Log Files      :: Redo log files are set of files that protect altered database data in memory that has not been written to Data Files. They are basically used for backup when a database crashes.&lt;br /&gt;j) Process                   :: A Process is a 'thread of control' or mechansim in Operating System that executes series of steps.&lt;br /&gt;&lt;br /&gt;5) What are Procedure,functions and Packages&lt;br /&gt;ANS: Procedures  and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or  perform set of related tasks.&lt;br /&gt; Procedures do not Return values while Functions return one One Value&lt;br /&gt;Packages      :: Packages Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents&lt;br /&gt;&lt;br /&gt;6) What are Database Triggers and Stored Procedures&lt;br /&gt;ANS: Database Triggers :: Database Triggers are Procedures that are automatically executed as a result of insert in, update to, or delete from table.&lt;br /&gt; Database triggers have the values old and new to denote the old value in the table before it is deleted and the new indicated the new value that will be used. DT are useful for implementing complex business rules which cannot be enforced using the integrity rules.We can have the trigger as Before trigger or After Trigger and at Statement or Row level.&lt;br /&gt;e.g:: operations insert,update ,delete   3&lt;br /&gt;        before ,after                                      3*2     A total of 6 combinatons&lt;br /&gt;        At statment level(once for the trigger) or row level( for every execution )       6 * 2    A total of 12.&lt;br /&gt; Thus a total of 12 combinations are there and the restriction of usage of 12 triggers has been lifted from Oracle 7.3 Onwards.&lt;br /&gt;Stored Procedures  :: Stored Procedures are Procedures that are stored in Compiled form in the database.The advantage of using the stored procedures is that many users can use the same procedure in compiled and ready to use format.&lt;br /&gt;&lt;br /&gt;7) How many Integrity Rules are there and what are they&lt;br /&gt;ANS: There are Three Integrity Rules. They are as follows ::&lt;br /&gt;a) Entity Integrity Rule :: The Entity Integrity Rule  enforces that the Primary key cannot be Null&lt;br /&gt;b) Foreign Key Integrity Rule :: The FKIR denotes that the relationship between the foreign key and the primary key has to be enforced.When there is data in Child Tables the Master tables cannot be deleted.&lt;br /&gt;c) Business Integrity Rules :: The Third Intigrity rule is about the complex business processes which cannot be implemented by the above 2 rules.&lt;br /&gt;&lt;br /&gt;8) What are the Various Master and Detail Relation ships.&lt;br /&gt;ANS: The various Master and Detail Relationship are&lt;br /&gt;a) NonIsolated :: The Master cannot be deleted when a child is exisiting&lt;br /&gt;b) Isolated         :: The Master can be deleted when the child is exisiting&lt;br /&gt;c) Cascading    :: The child gets deleted when the Master is deleted.&lt;br /&gt;&lt;br /&gt;9) What are the Various Block Coordination Properties&lt;br /&gt;ANS:The various Block Coordination Properties are&lt;br /&gt;a) Immediate&lt;br /&gt;Default Setting. The Detail records are shown when the Master Record are shown.&lt;br /&gt;b) Deffered  with Auto Query&lt;br /&gt;Oracle Forms defer fetching the detail records until the operator navigates to the detail block.&lt;br /&gt;c) Deffered with No Auto Query&lt;br /&gt;The operator must navigate to the detail block and explicitly  execute a query&lt;br /&gt;&lt;br /&gt;10) What are the Different Optimisation Techniques&lt;br /&gt;ANS:The Various Optimisation techniques are&lt;br /&gt;a) Execute Plan :: we can see the plan of the query and change it accordingly based on the indexes&lt;br /&gt;b) Optimizer_hint ::&lt;br /&gt;set_item_property('DeptBlock',OPTIMIZER_HINT,'FIRST_ROWS');&lt;br /&gt;Select /*+ First_Rows */ Deptno,Dname,Loc,Rowid from dept&lt;br /&gt;where (Deptno &gt; 25)&lt;br /&gt;c) Optimize_Sql ::&lt;br /&gt;By setting the Optimize_Sql = No, Oracle Forms assigns a single cursor for all SQL statements.This slow downs the processing because for evertime the SQL must be parsed whenver they are executed.&lt;br /&gt;f45run module = my_firstform userid = scott/tiger optimize_sql = No&lt;br /&gt;d) Optimize_Tp ::&lt;br /&gt; By setting the Optimize_Tp= No, Oracle Forms assigns seperate cursor only for each query SELECT  statement. All other SQL statements reuse the cursor.&lt;br /&gt;f45run module = my_firstform userid = scott/tiger optimize_Tp = No&lt;br /&gt;&lt;br /&gt;11) How do u implement the If statement in the  Select Statement&lt;br /&gt;ANS: We can implement the if statement in the select statement by using the Decode statement.&lt;br /&gt;e.g select   DECODE (EMP_CAT,'1','First','2','Second'Null);&lt;br /&gt;Here the Null is the else statement where null is done .&lt;br /&gt;&lt;br /&gt;12)How many types of Exceptions are there&lt;br /&gt;ANS: There are 2 types of exceptions. They are&lt;br /&gt;a) System Exceptions&lt;br /&gt;e.g. When no_data_found, When too_many_rows&lt;br /&gt;b) User Defined Exceptions&lt;br /&gt;e.g. My_exception exception&lt;br /&gt;When My_exception then&lt;br /&gt;&lt;br /&gt;13) What are the inline and the precompiler directives&lt;br /&gt;ANS:The inline and precompiler directives detect the values directly&lt;br /&gt;&lt;br /&gt;14) How do you use the same lov for 2 columns&lt;br /&gt;ANS: We can use the same lov for 2 columns by passing the return values  in global values and using the global values in the code&lt;br /&gt;&lt;br /&gt;15) How many minimum groups are required for a matrix report&lt;br /&gt;ANS:The minimum number of groups in matrix report are 4&lt;br /&gt;&lt;br /&gt;16) What is the difference between static and dynamic lov&lt;br /&gt;ANS:The static lov contains the predetermined values  while the dynamic lov contains values that come at run time&lt;br /&gt;&lt;br /&gt;17) What are snap shots and views&lt;br /&gt;ANS: Snapshots are mirror or replicas of tables. Views are built using the columns from one or more tables. The Single Table View can be updated but the view with multi table cannot be updated&lt;br /&gt;&lt;br /&gt;18) What are the OOPS concepts in Oracle.&lt;br /&gt;ANS: Oracle does implement the OOPS concepts. The best example is the Property Classes. We can categorise the properties by setting the visual attributes and then attach the property classes for the&lt;br /&gt;objects. OOPS supports the concepts of objects and classes and we can consider the peroperty classes as classes and the items as objects&lt;br /&gt;&lt;br /&gt;19)  What is the difference between candidate key, unique key and primary key&lt;br /&gt;ANS:Candidate keys are the columns in the table that could be the primary keys and the primary key&lt;br /&gt;is the key that has been selected to identify the rows. Unique key is also useful for identifying the  distinct rows in the table.&lt;br /&gt;&lt;br /&gt;20)What is concurrency&lt;br /&gt;ANS: Cuncurrency is  allowing simultaneous access of same data by different users.  Locks useful for accesing the database are&lt;br /&gt;a) Exclusive&lt;br /&gt;The exclusive lock is useful for locking the row when an insert,update or delete is being done.This lock should not be applied  when we do only select from the row.&lt;br /&gt;b) Share lock&lt;br /&gt;We can do the table as Share_Lock as many share_locks can be put on the same resource.&lt;br /&gt;&lt;br /&gt;21) Previleges and Grants&lt;br /&gt;ANS: Previleges  are the right to execute a  particulare type of SQL statements.&lt;br /&gt;e.g :: Right to Connect, Right to create, Right to resource&lt;br /&gt;Grants are given to the objects so that the object might be accessed accordingly.The grant has to be&lt;br /&gt;given by the owner of the object.&lt;br /&gt;&lt;br /&gt;22)Table Space,Data Files,Parameter File, Control Files&lt;br /&gt;ANS:Table Space :: The table space is useful for storing the data in the database.When a database is created two table spaces are created.&lt;br /&gt;a) System Table space :: This data file stores all the tables related to the system and dba tables&lt;br /&gt;b) User Table space      :: This data file stores all the user related tables&lt;br /&gt;We should have seperate table spaces for storing the tables and indexes so that the access is fast.&lt;br /&gt;Data Files :: Every Oracle Data Base has one or more physical data files.They store the data for the database.Every datafile is associated with only one database.Once the Data file is created the size cannot change.To increase the size of the database to store more data we have to add data file.&lt;br /&gt;Parameter Files :: Parameter file is needed to start an instance.A parameter file contains the list of instance configuration parameters e.g.::&lt;br /&gt;db_block_buffers = 500&lt;br /&gt;db_name = ORA7&lt;br /&gt;db_domain = u.s.acme lang&lt;br /&gt;Control Files  :: Control files record the physical structure of the data files and redo log files&lt;br /&gt;They contain the Db name, name and location of dbs, data files ,redo log files and time stamp.&lt;br /&gt;&lt;br /&gt;23) Physical Storage of the Data&lt;br /&gt;ANS: The finest level of granularity of the data base are the data blocks.&lt;br /&gt;Data Block :: One Data Block correspond  to specific number of physical database space&lt;br /&gt;Extent          :: Extent is the number of specific number of contigious data blocks.&lt;br /&gt;Segments   ::  Set of Extents allocated for Extents. There are three types of  Segments&lt;br /&gt;a) Data Segment :: Non Clustered Table has data segment data of every table  is stored in&lt;br /&gt;cluster data segment&lt;br /&gt;b) Index Segment :: Each Index has index segment that stores data&lt;br /&gt;c) Roll Back Segment :: Temporarily store 'undo' information&lt;br /&gt;&lt;br /&gt;24) What are the Pct Free and Pct Used&lt;br /&gt;ANS:Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table&lt;br /&gt;eg.:: Pctfree 20, Pctused 40&lt;br /&gt;&lt;br /&gt;25) What is Row Chaining&lt;br /&gt;ANS: The data of a row in a table may not be able to fit the same data block.Data for row is stored in a chain of data blocks .&lt;br /&gt;&lt;br /&gt;26) What is a 2 Phase Commit&lt;br /&gt;ANS:Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.&lt;br /&gt;a) Prepare Phase :: Global coordinator asks participants to prepare&lt;br /&gt;b) Commit  Phase :: Commit all participants to coordinator to Prepared, Read only or abort Reply&lt;br /&gt;&lt;br /&gt;27)  What is the difference between  deleting and truncating of tables&lt;br /&gt;ANS: Deleting   a table will not remove the rows from the table but entry is there in  the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.&lt;br /&gt;&lt;br /&gt;28) What are mutating tables&lt;br /&gt;ANS: When a table is in state of transition it is said to be mutating. eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select.&lt;br /&gt;&lt;br /&gt;29)  What are Codd Rules&lt;br /&gt;ANS: Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules.&lt;br /&gt;&lt;br /&gt;30) What is Normalisation&lt;br /&gt;ANS: Normalisation is the process of organising the tables to remove the redundancy.There are mainly 5 Normalisation rules.&lt;br /&gt;a) 1 Normal Form ::  A table is said to be in 1st Normal Form when the attributes are atomic&lt;br /&gt;b) 2 Normal Form ::  A table is said to be in 2nd Normal Form when all the candidate keys are dependant on the primary key&lt;br /&gt;c) 3rd Normal Form :: A table is said to be third Normal form when it is not dependant transitively&lt;br /&gt;&lt;br /&gt;31) What is the Difference between a post query and a pre query&lt;br /&gt;ANS: A post query will fire for every row that is fetched but the pre query will fire only once.&lt;br /&gt;&lt;br /&gt;32) Deleting the Duplicate rows in the table&lt;br /&gt;ANS: We can delete the duplicate rows in the table by using the Rowid&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;33) Can U disable database trigger? How?&lt;br /&gt;ANS: Yes. With respect to table&lt;br /&gt;     ALTER TABLE TABLE&lt;br /&gt;     [   DISABLE all_trigger ]&lt;br /&gt;&lt;br /&gt;34) What is pseudo columns ? Name them?&lt;br /&gt; ANS: A pseudocolumn behaves like a table column, but is not actually&lt;br /&gt;    stored in the table.  You can select from pseudocolumns, but you&lt;br /&gt;    cannot insert, update, or delete their values.  This section&lt;br /&gt;    describes these pseudocolumns:&lt;br /&gt;   * CURRVAL&lt;br /&gt;    * NEXTVAL&lt;br /&gt;    * LEVEL&lt;br /&gt;    * ROWID&lt;br /&gt;    * ROWNUM&lt;br /&gt;&lt;br /&gt;35) How many columns can table have?&lt;br /&gt;ANS:      The number of columns  in a table can range from 1 to 254.&lt;br /&gt;&lt;br /&gt;36) Is space acquired in blocks or extents ?&lt;br /&gt;ANS:     In extents .&lt;br /&gt;&lt;br /&gt;37) what is clustered index?&lt;br /&gt;ANS:      In an indexed cluster, rows are stored  together based on their cluster key values .&lt;br /&gt;      Can not applied for HASH.&lt;br /&gt;&lt;br /&gt;38) what are the datatypes supported By oracle (INTERNAL)?&lt;br /&gt;ANS:      Varchar2, Number,Char , MLSLABEL.&lt;br /&gt;&lt;br /&gt;39 ) What are attributes of cursor?&lt;br /&gt; ANS:     %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT&lt;br /&gt;&lt;br /&gt;40) Can you use select in FROM clause of SQL select ?&lt;br /&gt; ANS:     Yes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Forms 4.5 Questions&lt;br /&gt;&lt;br /&gt;1) Which trigger are created when master -detail rela?&lt;br /&gt;ANS: master delete property&lt;br /&gt;&lt;br /&gt;*  NON-ISOLATED (default)&lt;br /&gt;&lt;br /&gt;a) on check delete master&lt;br /&gt;b) on clear details&lt;br /&gt;c) on populate details&lt;br /&gt;&lt;br /&gt; *  ISOLATED&lt;br /&gt;&lt;br /&gt;a) on clear details&lt;br /&gt;b) on populate details&lt;br /&gt;&lt;br /&gt;*  CASCADE&lt;br /&gt;&lt;br /&gt;a) per-delete&lt;br /&gt;b) on clear details&lt;br /&gt;c) on populate details&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) which system variables can be set by users?&lt;br /&gt;ANS:SYSTEM.MESSAGE_LEVEL&lt;br /&gt;SYSTEM.DATE_THRESHOLD&lt;br /&gt;SYSTEM.EFFECTIVE_DATE&lt;br /&gt;SYSTEM.SUPPRESS_WORKING&lt;br /&gt;&lt;br /&gt;3) What are object group?&lt;br /&gt;ANS:An object group is a container for a group of objects. You define an object group when you want to  package related objects so you can copy or reference them in another module.&lt;br /&gt;&lt;br /&gt;4) What are referenced objects?&lt;br /&gt;ANS:Referencing allows you to create objects that inherit their functionality and appearance from other objects.&lt;br /&gt;Referencing an object is similar to copying an object, except that the resulting reference object maintains a&lt;br /&gt; link to its source object. A reference object automatically inherits any changes that have been made to the&lt;br /&gt;source object when you open or regenerate the module that contains the reference object.&lt;br /&gt;&lt;br /&gt;5) Can you store objects in library?&lt;br /&gt;ANS:Referencing allows you to create objects that inherit their functionality and appearance from other&lt;br /&gt;objects. Referencing an object is similar to copying an object, except that the resulting reference&lt;br /&gt;object maintains a link to its source object. A reference object automatically inherits any changes that&lt;br /&gt;have been made to the source object when you open or regenerate the module that contains the&lt;br /&gt;reference object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6) Is forms 4.5 object oriented tool ? why?&lt;br /&gt;ANS:yes , partially. 1) PROPERTY CLASS - inheritance property&lt;br /&gt;                          2) OVERLOADING : procedures and functions.&lt;br /&gt;&lt;br /&gt;7) Can you issue DDL in forms?&lt;br /&gt;ANS:yes, but you have to use FORMS_DDL.&lt;br /&gt;Referencing allows you to create objects that inherit their functionality and appearance from other&lt;br /&gt;objects. Referencing an object is similar to copying an object, except that the resulting reference object&lt;br /&gt;maintains a link to its source object. A reference object automatically inherits any changes that have&lt;br /&gt;been made to the source object when you open or regenerate the module that contains the reference object.&lt;br /&gt;Any string expression up to 32K:&lt;br /&gt;·a literal&lt;br /&gt;·         an expression or a variable representing the text of a block of dynamically created PL/SQL code&lt;br /&gt;·         a DML statement or&lt;br /&gt;·         a DDL statement&lt;br /&gt;&lt;br /&gt;Restrictions:&lt;br /&gt;The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the&lt;br /&gt;values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8) What is SECURE property?&lt;br /&gt;ANS: Hides characters that the operator types into the text item.  This setting is typically used for&lt;br /&gt; password protection.&lt;br /&gt;&lt;br /&gt;9 ) What are the types of triggers and how the sequence of firing in text item&lt;br /&gt;ANS:Triggers can be classified as Key Triggers, Mouse Triggers ,Navigational Triggers.&lt;br /&gt;Key Triggers :: Key Triggers are fired as a result of Key action.e.g :: Key-next-field, Key-up,Key-Down&lt;br /&gt;Mouse Triggers :: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-button-presed,when-mouse-doubleclicked,etc&lt;br /&gt;Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g :  Post-Text-item,Pre-text-item.&lt;br /&gt;We also have event triggers like when –new-form-instance and when-new-block-instance.&lt;br /&gt;We cannot call restricted procedures like go_to(‘my_block.first_item’) in the Navigational triggers&lt;br /&gt;But can use them in the Key-next-item.&lt;br /&gt;The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text  is fired as a result of the mouse movement. Key next will not fire unless there is a key event.&lt;br /&gt;The sequence of firing in a text item are as follows ::&lt;br /&gt;    a) pre - text&lt;br /&gt;    b) when new item&lt;br /&gt;    c) key-next&lt;br /&gt;    d) when validate&lt;br /&gt;    e) post text&lt;br /&gt;&lt;br /&gt;10 ) Can you store pictures in database? How?&lt;br /&gt;ANS:Yes , in long Raw datatype.&lt;br /&gt;&lt;br /&gt;11) What are property classes ? Can property classes have trigger?&lt;br /&gt;ANS:Property class inheritance is a powerful feature that allows you to quickly define objects that conform to&lt;br /&gt;your own interface and functionality standards. Property classes also allow you to make global changes to&lt;br /&gt;applications quickly.  By simply changing the definition of a property class, you can change the definition&lt;br /&gt;of all objects that inherit properties from that class.&lt;br /&gt;Yes . All type of triggers .&lt;br /&gt;&lt;br /&gt;* 12 a) If you have property class attached to an item and you have same trigger written for the item .&lt;br /&gt;         Which will fire first?&lt;br /&gt;  ANS:Item level trigger fires , If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.&lt;br /&gt;&lt;br /&gt;13) What are record groups ? * Can record groups created at run-time?&lt;br /&gt;ANS:A record group is an internal Oracle Forms data structure that has a column/row framework similar to a&lt;br /&gt;database table.  However, unlike database tables, record groups are separate objects that belong to the&lt;br /&gt;form module in which they are defined.  A record group can have an unlimited number of columns of type&lt;br /&gt;CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K. &lt;br /&gt;Record group column names cannot exceed 30 characters.&lt;br /&gt;Programmatically, record groups can be used whenever the functionality offered by a two-dimensional&lt;br /&gt;array of multiple data types is desirable.&lt;br /&gt;TYPES OF RECORD GROUP:&lt;br /&gt;Query Record Group  A query record group is a record group that has an associated SELECT statement. &lt;br /&gt;       The columns in a query record group derive their default names, data types, and lengths from the database  columns referenced in the SELECT statement.  The records in a query record group are the rows retrieved by the query associated with that record group.&lt;br /&gt;Non-query Record Group      A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.&lt;br /&gt;Static Record Group  A static record group is not associated with a query; rather, you define its&lt;br /&gt;structure and row values at design time, and they remain fixed at    runtime.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14) What are ALERT?&lt;br /&gt;ANS:An ALERT is a modal window that displays a message notifiying operator of some application&lt;br /&gt;   condition.&lt;br /&gt;&lt;br /&gt;15) Can a button have icon and lable at the same time ?&lt;br /&gt;ANS:   -NO&lt;br /&gt;&lt;br /&gt;16) What is mouse navigate property of button?&lt;br /&gt;ANS:When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus&lt;br /&gt;to the item when the operator activates the item with the mouse. &lt;br /&gt;&lt;br /&gt;When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.&lt;br /&gt;&lt;br /&gt;17) What is FORMS_MDI_WINDOW?&lt;br /&gt;ANS: forms run inside the MDI application window. This property is useful for calling a form from another one.&lt;br /&gt;&lt;br /&gt;18)  What are timers ? when  when-timer-expired does not fire?&lt;br /&gt; ANS: The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.&lt;br /&gt;&lt;br /&gt;19 ) Can object group have a block?&lt;br /&gt; ANS:Yes , object group can have block as well as program units.&lt;br /&gt;&lt;br /&gt;20)  How many types of canvases are there.&lt;br /&gt;ANS:There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;The following questions might not be asked in an Average Interview and could be asked when the Interviewer wants to trouble u and go deeppppppppppppp……He cannot go further…..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;21) What are user-exits?&lt;br /&gt;ANS:  It invokes 3GL programs.&lt;br /&gt;&lt;br /&gt;22) Can you pass values to-and-fro from foreign function ? how ?&lt;br /&gt;ANS: Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms&lt;br /&gt;variable or item.  Make sure that the Oracle Forms variable or item is the same data type as the return value&lt;br /&gt;from the foreign function.&lt;br /&gt;After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as&lt;br /&gt;a parameter value in the PL/SQL interface of the foreign function.  The PL/SQL variable that is passed as&lt;br /&gt;a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined&lt;br /&gt;in the PL/SQL interface. &lt;br /&gt;&lt;br /&gt;23) What is IAPXTB structure ?&lt;br /&gt;ANS: The entries of  Pro * C and user exits and the form which simulate the proc or user_exit are stored in IAPXTB  table in d/b.&lt;br /&gt;&lt;br /&gt;24) Can you call WIN-SDK thruo' user exits?&lt;br /&gt;ANS: YES.&lt;br /&gt;&lt;br /&gt;25) Does user exits supports DLL on MSWINDOWS ?&lt;br /&gt;ANS:YES .&lt;br /&gt;&lt;br /&gt;26) What is path setting for DLL?&lt;br /&gt;ANS: Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL.  If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL.&lt;br /&gt;&lt;br /&gt; 27) How is mapping of name of DLL and function done?&lt;br /&gt;ANS: The dll can be created using the Visual C++ / Visual Basic Tools and then the dll is put in the&lt;br /&gt;path that is defined the registery.&lt;br /&gt;&lt;br /&gt;28) what is precompiler?&lt;br /&gt;ANS:    It is similar to C precompiler directives.&lt;br /&gt;&lt;br /&gt; 29) Can you connect to non - oracle datasource ? How?&lt;br /&gt;ANS: Yes . &lt;br /&gt;&lt;br /&gt;30 ) what are key-mode and locking mode properties? level ?&lt;br /&gt;ANS: Key Mode : Specifies how oracle forms uniquely identifies rows in the database.This is property includes&lt;br /&gt;for application that will run against NON-ORACLE datasources .&lt;br /&gt;Key setting     unique (default.)&lt;br /&gt;                   dateable&lt;br /&gt;                   n-updateable.&lt;br /&gt;&lt;br /&gt;Locking mode :&lt;br /&gt;Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form.&lt;br /&gt;a) immediate b) delayed&lt;br /&gt;&lt;br /&gt;31) What are savepoint mode and cursor mode properties ? level?&lt;br /&gt;ANS: Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily  for applications that will run against non-ORACLE data sources.   For applications that will run against ORACLE, use the default setting.&lt;br /&gt;Cursor mode - define cursur state across transaction&lt;br /&gt;Open/close.&lt;br /&gt;&lt;br /&gt;32) Can you replace default form processing ? How ?&lt;br /&gt;&lt;br /&gt;33) What is transactional trigger property?&lt;br /&gt;ANS:  Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage  as transactional block.(NON-ORACLE datasource) default - FALSE.&lt;br /&gt;&lt;br /&gt;34) What is OLE automation ?&lt;br /&gt;ANS: OLE automation allows an OLE server application to expose a set of commands and functions that can be&lt;br /&gt;invoked from an OLE container application.  OLE automation provides a way for an OLE container application  to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE)&lt;br /&gt;&lt;br /&gt;35) What does invoke built-in do?&lt;br /&gt;ANS: This procedure invokes a method.&lt;br /&gt;Syntax:&lt;br /&gt;PROCEDURE OLE2.INVOKE&lt;br /&gt;   (object obj_type,&lt;br /&gt;    method VARCHAR2,&lt;br /&gt;    list   list_type := 0);&lt;br /&gt;Parameters:&lt;br /&gt;object Is an OLE2 Automation Object.&lt;br /&gt;method         Is a method (procedure) of the OLE2 object.&lt;br /&gt;list      Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function.&lt;br /&gt;&lt;br /&gt;36) What are OPEN_FORM,CALL_FORM,NEW_FORM? diff?&lt;br /&gt;ANS: CALL_FORM : It calls the other form. but parent remains active, when called form completes the operation ,  it releases lock and control goes back to the calling form.&lt;br /&gt;When you call a form, Oracle Forms issues a savepoint for the called form.  If the CLEAR_FORM function&lt;br /&gt;causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this&lt;br /&gt;savepoint.&lt;br /&gt;OPEN_FORM : When you call a form, Oracle Forms issues a savepoint for the called form.  If the&lt;br /&gt;CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back&lt;br /&gt;uncommitted changes to this savepoint.&lt;br /&gt;NEW_FORM :  Exits the current form and enters the indicated form.  The calling form is terminated as&lt;br /&gt;the parent form.  If the calling form had been called by a higher form, Oracle Forms keeps the higher call&lt;br /&gt; active and treats it as a call to the new form.  Oracle Forms releases memory (such as database cursors)&lt;br /&gt;that the terminated form was using.&lt;br /&gt;Oracle Forms runs the new form with the same Runform options as the parent form.  If the parent form was&lt;br /&gt;a called form, Oracle Forms runs the new form with the same options as the parent form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;37 ) What is call form stack?&lt;br /&gt;ANS: When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known  as the call form stack.&lt;br /&gt;&lt;br /&gt;38) Can u port applictions across the platforms? how?&lt;br /&gt;ANS: Yes we can port applications across platforms.Consider the form developed in a windows system.The form would be generated in unix system by using f45gen my_form.fmb scott/tiger&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;39) What is a visual attribute?&lt;br /&gt;ANS: Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface.&lt;br /&gt;&lt;br /&gt;40) Diff. between VAT and Property Class?  imp&lt;br /&gt;ANS:Named visual attributes define only font, color, and pattern attributes; property classes can contain these and  any other properties.&lt;br /&gt;You can change the appearance of objects at runtime by changing the named visual attribute&lt;br /&gt;programmatically; property class assignment cannot be changed programmatically.&lt;br /&gt;When an object is inheriting from both a property class and a named visual attribute, the named visual&lt;br /&gt;attribute settings take precedence, and any visual attribute properties in the class are ignored.&lt;br /&gt;&lt;br /&gt;41) Which trigger related to mouse?&lt;br /&gt;ANS: When-Mouse-Click&lt;br /&gt;    When-Mouse-DoubleClick&lt;br /&gt;    When-Mouse-Down&lt;br /&gt;    When-Mouse-Enter&lt;br /&gt;    When-Mouse-Leave&lt;br /&gt;    When-Mouse-Move&lt;br /&gt;     When-Mouse-Up&lt;br /&gt;&lt;br /&gt;42) What is Current record attribute property?&lt;br /&gt;ANS:  Specifies the named visual attribute used when an item is part of the current record.&lt;br /&gt;Current Record Attribute is frequently used at the block level to display the current row in a multi-record&lt;br /&gt;If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color&lt;br /&gt;when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus  changes. &lt;br /&gt;&lt;br /&gt;43) Can u change VAT at run time?&lt;br /&gt;ANS: Yes. You can programmatically change an object's named visual attribute setting to change the font, color,&lt;br /&gt;and pattern of the object at runtime.&lt;br /&gt;&lt;br /&gt;44) Can u set default font in forms?&lt;br /&gt;ANS: Yes. Change windows registry(regedit). Set form45_font to the desired font.&lt;br /&gt;&lt;br /&gt;45) Can u have OLE objects in forms?&lt;br /&gt;ANS: Yes.&lt;br /&gt;&lt;br /&gt;46) Can u have VBX and OCX controls in forms ?&lt;br /&gt;ANS: Yes.&lt;br /&gt;&lt;br /&gt;47) What r the types of windows (Window style)?&lt;br /&gt;ANS: Specifies whether the window is a Document window or a Dialog window.&lt;br /&gt;&lt;br /&gt;48) What is OLE Activation style property?&lt;br /&gt;ANS: Specifies the event that will activate the OLE containing item.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;49) Can u change the mouse pointer ? How?&lt;br /&gt;ANS: Yes. Specifies the mouse cursor style.  Use this property to dynamically change the shape of the cursor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reports 2.5&lt;br /&gt;&lt;br /&gt;1)How many types of columns are there and what are they&lt;br /&gt;ANS:Formula columns :: For doing mathematical calculations and returning one value&lt;br /&gt;Summary Columns :: For doing summary calculations such as summations etc.&lt;br /&gt;Place holder Columns :: These columns are useful for storing the value in a variable&lt;br /&gt;&lt;br /&gt;2)Can u have more than one layout in report&lt;br /&gt;ANS: It is possible to have more than one layout in a report by using the additional layout option in the layout editor.&lt;br /&gt;&lt;br /&gt;3)    Can u run the report with out a parameter form&lt;br /&gt;ANS:Yes it is possible to run the report without parameter form by setting the PARAM value to Null&lt;br /&gt;&lt;br /&gt;4)  What is the lock option in reports layout&lt;br /&gt;ANS:By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields .&lt;br /&gt;&lt;br /&gt;5)What is Flex&lt;br /&gt;ANS: Flex is the property of moving the related fields together by setting the flex property on&lt;br /&gt;&lt;br /&gt;6)What are the minimum number of groups required for a matrix report&lt;br /&gt;ANS: The minimum of groups required for a matrix report are 4&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-3751078288468439717?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/3751078288468439717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=3751078288468439717' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3751078288468439717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/3751078288468439717'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/important-questions-in-oracle-developer.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-4056024082660480962</id><published>2008-04-30T04:15:00.000-03:00</published><updated>2008-04-30T04:17:42.807-03:00</updated><title type='text'></title><content type='html'>&lt;a name="SAVE"&gt;Why should I save my Forms in the database?&lt;/a&gt;&lt;br /&gt;Forms should always be saved in the database because:&lt;br /&gt;Only Forms stored in the database can be documented with the provided facilities;&lt;br /&gt;To reference or copy a Form's objects (procedures, triggers, blocks, fields, text pages) that Form must be stored in the database; and&lt;br /&gt;Forms stored in the database are automatically backed up with the database.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="LOV"&gt;Why is a List of Values so slow?&lt;/a&gt;&lt;br /&gt;Unlike a normal SQL*Forms query, which performs buffering, a List of Values (LOV) will read all of the records queried from the database before displaying them.&lt;br /&gt;LOV's can be replaced with separate Forms to reduce the number of records transmitted from the database and to save huge amounts of memory.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="SYSDATE"&gt;Why shouldn't I overuse SYSDATE?&lt;/a&gt;&lt;br /&gt;Remember "form_field_x := SYSDATE;" will translate into a&lt;br /&gt;SELECT SYSDATE FROM DUAL;&lt;br /&gt;statement to be issued against the database. The same apply to USER, UID and USERENV. So, it is much better to use:&lt;br /&gt;          screen_field_a := SYSDATE;&lt;br /&gt;          screen_field_b := screen_field_a;&lt;br /&gt;instead of:&lt;br /&gt;          screen_field_a := SYSDATE;&lt;br /&gt;          screen_field_b := SYSDATE;&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="SIZE"&gt;Why should I try to keep my Forms as small as possible?&lt;/a&gt;&lt;br /&gt;A form is a data file read by the IAP execution process. A larger form will take longer to read and hence execute; and&lt;br /&gt;Long SQL statements and triggers will take longer to parse.&lt;br /&gt;General rules:&lt;br /&gt;Use short block and field names as well as table aliases to reduce your Form's size.&lt;br /&gt;Plan the use of 'common' database procedures and Forms triggers and what should be the naming standard of these.&lt;br /&gt;Modularize as much as possible. Use procedures for repeated code and make full use of parameters for any slight differences in functionality.&lt;br /&gt;Don't repeat SQL statements. Use form or database procedures (or user named triggers) instead. This prevents re-parsing of the same statements and reduces storage requirements since each cursor uses at least 4K of memory. This will also reduce the form's size and will result in faster load and execution times.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="INTEG"&gt;Why should I use database integrity constraints?&lt;/a&gt;&lt;br /&gt;Use database integrity constraints on all your entities (tables) to denote primary and foreign key's, uniqueness and check values. With "DEFAULT BLOCK GENERATION" this information will be used by Forms to generate some of the validation and triggers on your behalf.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DML"&gt;In what triggers can't I use DML statements?&lt;/a&gt;&lt;br /&gt;Do not use DML (Data Manipulation Language) statements such as INSERT, UPDATE, and DELETE in any triggers apart from commit time transactional triggers (PRE-INSERT, POST-UPDATE...). They can actually be used without causing a syntax error in most triggers, but this is generally to be avoided as it can de-synchronize the state of records in SQL*Forms and rows in the database, and can cause unexpected behaviour. The reason for this is that if you perform any DML the status of the Form does not change as it would, had you performed the operation on a default block. So if you exit the form without performing a commit, all your changes are lost as Forms does not know about them, and will not prompt you to COMMIT/ROLLBACk. Unlike DML commands, DDL (Data Definition Language) and DCL (Data Control Language) are not legal in any SQL*Forms triggers.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DDL"&gt;Why can't one use DDL statements in a Form?&lt;/a&gt;&lt;br /&gt;DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not supported in SQL*Forms because your Form is not suppose to manipulate the database structure. Don't use them in user exits either as they will force an implicit COMMIT and de-synchronize SQL*Forms.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="RESTRICT"&gt;In what triggers can I use restricted package procedures?&lt;/a&gt;&lt;br /&gt;All triggers can do SELECTs and call unrestricted packaged procedures but only KEY triggers and the ON-NEW-FIELD-INSTANCE trigger can call restricted package procedures. A list of these restricted packaged procedures are provided at the end of chapter 16, 'Packaged Procedures', of the SQL*Forms Designer's Reference.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="SQLvsFORMS"&gt;Should I use SQL or SQL*Forms statements?&lt;/a&gt;&lt;br /&gt;Try not to issue SQL statements if the goal can be accomplished with SQL*Forms statements (eg. field assignment, DEFAULT_VALUE, etc.). Because SQL*Forms statements executes within Forms, it is much faster and does not use cursors.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="NXTFLD"&gt;Why shouldn't I use KEY-NXTFLD and KEY-PRVFLD triggers?&lt;/a&gt;&lt;br /&gt;Replace KEY-NXTFLD and KEY-PRVFLD with ON-VALIDATE-FIELD, ON-VALIDATE-RECORD and ON-NEW-FIELD-INSTANCE triggers as KEY-NXTFLD and KEY-PRVFLD will neither trigger in a block mode (mainframe) environment nor with mouse movement in a GUI bit-mapped environment.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DBCODE"&gt;Why and how should I use database packages, procedures and functions?&lt;/a&gt;&lt;br /&gt;One should write DATA API's (Application programming interfaces) or packages on the database utilizing stored functions and procedures. This API should then be used to replace all SQL access to the database. It can be build in an Object Oriented fashion based on your Entity Relationship Diagram or Function Hierarchy Diagram.&lt;br /&gt;The names you choose should be readable and reflect functionality. Eg.:&lt;br /&gt;      emp.hire_employee   (constructor)&lt;br /&gt;      emp.fire_employee   (destructor)&lt;br /&gt;      emp.retire_employee (destructor)&lt;br /&gt;      emp.promote         (operation)&lt;br /&gt;      emp.raise_salary    (operation)&lt;br /&gt;Some of the advantages of this approach is:&lt;br /&gt;Ensure that code is centrally maintained and not duplicated in more than one Form;&lt;br /&gt;Different application interfaces can be written in different languages (English, Greek, etc.) utilizing different GUI builders (Forms, C++, SQLWindows, etc.) because the client interface doesn't contain any complicated logic;&lt;br /&gt;This will hide database complexities from the Forms designers;&lt;br /&gt;Will always ensure data integrity because tables can't be directly accessed (Insert/Update);&lt;br /&gt;This method is particularly suited for Client/Server deployment because it minimize network I/O;&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DUPROWS"&gt;How can I eliminate duplicate rows in a base table block?&lt;/a&gt;&lt;br /&gt;To eliminate duplicate rows in a base table block, create a SELECT DISTINCT view on your base table. Be careful for bad performance though.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="GLOBALS"&gt;Should I use GLOBAL variables or HIDDEN fields?&lt;/a&gt;&lt;br /&gt;Global variables can be used in DML and SELECT statements but you can't use global variables in a default Where/Order By clause. Also, remember that global variables are always of type char and that implicit conversion might disable the use of indexes (eg. ...where number_field = :global.x).&lt;br /&gt;Global variables that will no longer be used in the application should be deallocated from memory. Use the ERASE command to perform this. Below are some memory requirements for SQL*Forms variables:&lt;br /&gt;     Base Table Field:        +-100 bytes + 2*field length&lt;br /&gt;     Non-Base Table Field:    +-100 bytes + field length&lt;br /&gt;     Global Variable:         +- 20 bytes (internal structure) +&lt;br /&gt;                                255 bytes (data length)&lt;br /&gt;Therefore, Non-Base Table Fields will take up less room than a global variable when it holds less than 175 bytes or characters. For database fields, global variables will use less space when dealing with more than about 88 bytes.&lt;br /&gt;Some considerations:&lt;br /&gt;Fields require longer set-up time during start up.&lt;br /&gt;Fields can be used in a DEFAULT WHERE/ORDER BY; unlike Globals.&lt;br /&gt;Globals are character only. TO_NUMBER and other datatype conversion functions are somewhat time expensive.&lt;br /&gt;Lookup times for fields (qualified by blockname) are comparable to lookup times for Globals.&lt;br /&gt;Memory for Global variables gets allocated on an as needed basis.&lt;br /&gt;Fields are cleared during CLEAR_FORM; Globals are not.&lt;br /&gt;In general, control fields can offer lower memory requirements and faster performance for datatypes other than character. Globals are a more convenient data structure since they do not deal with screen position, attributes to be set and triggers to be fired.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="BLKFLD"&gt;Is it better to use :block.fieldname or just :fieldname?&lt;/a&gt;&lt;br /&gt;Always use :block.fieldname. The reason for this is that SQL*Forms contains an internal data structure to hold all of the information about blocks and their associated fields. By always specifying the blockname, SQL*Forms will not have to search through all of the blocks to find the correct field. This saves a lot of time especially for forms with many blocks and many fields. In addition, :block.field references are less ambiguous and easier to read.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="PRIMKEYS"&gt;How can I generate unique database key values?&lt;/a&gt;&lt;br /&gt;Use the sequence generator to generate unique primary keys:&lt;br /&gt;SELECT sequence_name.NEXTVAL, ...&lt;br /&gt;Issue this statement only as the last step of the PRE-INSERT after the validations. This will prevent the generation of numbers that won't be used.&lt;br /&gt;You can do a "SELECT * FROM USER_SEQUENCES;" to get a list of sequences for your current Oracle user/schema.&lt;br /&gt;Note that a SELECT MAX(...)+1 can generate duplicate key values. If you add a LOCK statement to prevent this, multiple users will wait for the next value of the primary key.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="PORTABLE"&gt;How can I make my Forms more portable?&lt;/a&gt;&lt;br /&gt;Avoid operating system dependencies like C, COBOL or Assembler interfaces, "EXEC CICS..." call's etc.&lt;br /&gt;Re-write user-exits to PL/SQL procedures and functions because user exits limits portability, increases maintenance and unnecessarily complicates an application.&lt;br /&gt;Always put a SPACE before and after screen fields.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="REDABLE"&gt;How can I make my code more readable?&lt;/a&gt;&lt;br /&gt;Avoid the use of the NXTBLK, PRVBLK, NXTFLD, PRVFLD macros. Use GOBLK, GOFLD instead because it is easier to read and to maintain.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MEMORY"&gt;How can I make my Forms more memory efficient?&lt;/a&gt;&lt;br /&gt;NEW_FORM as much as possible versus using CALL. With CALL, the previous form and any other previously CALLed forms are kept in memory.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="PERFORM"&gt;How can I make my Forms perform better?&lt;/a&gt;&lt;br /&gt;Group SELECT ... FROM DUAL;'s. If the value of SYSDATE and USER are to be used, it will save time if you make one trip to the database instead of two. In a networked environment (Client/Server) this could be particularly advantageous.&lt;br /&gt;         SELECT sysdate,user INTO ... FROM dual;&lt;br /&gt;versus&lt;br /&gt;         SELECT sysdate INTO ... FROM dual;&lt;br /&gt;         SELECT user into ... FROM dual;&lt;br /&gt;Note that if you access these same values elsewhere, you may wish to store these variables into globals or local variables rather than make another request across the network.&lt;br /&gt;Avoid using SELECT ... from DUAL's to perform logic or calculations. By using PL/SQL's IF THEN ELSE END IF; constructs, SQL*Forms does not have to access the database.&lt;br /&gt;Database procedures can be more efficient than the equivalent Forms and SQL code because it executed directly on the server (near the data) and doesn't need to go though the SQL layer.&lt;br /&gt;Be careful when enforcing uniqueness with the "PRIMARY KEY" column attribute. Oracle has to issue a SELECT statement to verify whether the value already exists. This check might be done with a full table scan!!! Make sure that a unique index or constraint has been defined for this column. An alternative is to use your own well designed query to replace this functionality.&lt;br /&gt;Retrieve as many columns and do as many computations and validations in a single select statement as possible. This will reduce storage, parsing time and database activity.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MESSAGE"&gt;Why doesn't my messages show on the screen?&lt;/a&gt;&lt;br /&gt;Regardless of whether you call MESSAGE(), your message may or may not be displayed. This is because messages are displayed asynchronously. To display messages immediately, use the SYNCHRONIZE packaged procedure:&lt;br /&gt;message('...'); synchronize;&lt;br /&gt;The SYNCHRONIZE; packaged procedure forces SQL*Forms to display any information that it should write to the screen but hasn't yet.&lt;br /&gt;This can also be used to execute a query while the user is looking at the results of a previous query.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="ART"&gt;Should I always use the latest and greatest functionality available?&lt;/a&gt;&lt;br /&gt;With new and improved capabilities, you should guard against the tendency to create programs that are "works of art" and maintenance nightmares.&lt;br /&gt;&lt;br /&gt;     "The ability to simplify means to eliminate the&lt;br /&gt;     unnecessary so that the necessary may speak"&lt;br /&gt;                    Hans Hofmann, Search for the Real, 1967.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="UPGRADE"&gt;How can I get rid of V2-stype triggers?&lt;/a&gt;&lt;br /&gt;Download and run this &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/download/frm3cvt.zip"&gt;V2-style to PL/SQL Forms Converter&lt;/a&gt;.&lt;br /&gt;This package will read the SQL*Forms V3.0 tables and convert all V2-stype triggers to PL/SQL. Run it after you've upgraded from Forms V2.x or before you upgrade from Forms 3.0 to a higher release.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm3.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="LOOPITEMS"&gt;How does one iterate through items in a specified block?&lt;/a&gt;&lt;br /&gt;Code example:&lt;br /&gt;OriPos := TO_NUMBER(:System.Trigger_Record);&lt;br /&gt;First_Record;&lt;br /&gt;&lt;br /&gt;LOOP&lt;br /&gt;  --   do processing&lt;br /&gt;  IF (:System.Last_Record = 'TRUE') THEN&lt;br /&gt;     Go_Record(OriPos);&lt;br /&gt;     EXIT;&lt;br /&gt;  ELSE&lt;br /&gt;     Next_Record;&lt;br /&gt;  END IF;&lt;br /&gt;END LOOP&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="ONLOGON"&gt;Can on bypass the Oracle login screen?&lt;/a&gt;&lt;br /&gt;The first thing that the user sees when using runform is the Oracle logon prompt asking them for their username, password, and database to connect to. You can bypass this screen or customise it by displaying your own logon screen. Eg:&lt;br /&gt;ON-LOGIN&lt;br /&gt;declare&lt;br /&gt;    uname varchar2(10);&lt;br /&gt;    pass  varchar2(10);&lt;br /&gt;begin&lt;br /&gt;    uname := 'username';&lt;br /&gt;    pass  :='password';&lt;br /&gt;    logon(uname, pass'@connect_database');&lt;br /&gt;end;&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="RESIZE"&gt;Can one Maximize/ Minimize a Window in Forms?&lt;/a&gt;&lt;br /&gt;On MS-Windows, Forms run inside a Windows Multiple-Document Interface (MDI) window. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. Examples:&lt;br /&gt;        set_window_property(FORMS_MDI_WINDOW, WINDOW_STATE, MINIMIZE);&lt;br /&gt;        set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15);&lt;br /&gt;        set_window_property('my_window_name', WINDOW_STATE, MAXIMIZE);&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="FORMSDLL"&gt;Can one issue DDL statements from Forms?&lt;/a&gt;&lt;br /&gt;DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure.&lt;br /&gt;A statement like CREATE TABLE X (A DATE); will result in error:&lt;br /&gt;Encountered the symbol "CREATE" which is a reserved word.&lt;br /&gt;However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:&lt;br /&gt;FORMS_DDL('CREATE TABLE X (A DATE)');&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DYNSQL"&gt;Can one execute dynamic SQL from Forms?&lt;/a&gt;&lt;br /&gt;Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. Eg:&lt;br /&gt;FORMS_DDL('INSERT INTO X VALUES ('  col_list  ')');&lt;br /&gt;Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="RESTRICTED"&gt;Forms won't allow me to use restricted built-in's. What should I do?&lt;/a&gt;&lt;br /&gt;How to get around the "can't use a restricted built-in in built-in XXX" message:&lt;br /&gt;1. Create a TIMER at the point where you want the navigation to occur. Eg. create_timer('TIMER_X', 5, NO_REPEAT);&lt;br /&gt;2. Code a WHEN-TIMER-EXPIRED trigger to handle the navigation&lt;br /&gt;DECLARE&lt;br /&gt;  tm_name  VARCHAR2(20);&lt;br /&gt;BEGIN&lt;br /&gt;  tm_name  := Get_Application_Property(TIMER_NAME);&lt;br /&gt;  IF tm_name = 'TIMER_X' THEN&lt;br /&gt;    Go_Item('ITEM_X');&lt;br /&gt;  END IF;&lt;br /&gt;END;&lt;br /&gt;Dirty but effective (didn't Oracle promise to fix this feature?).&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="CURSOR"&gt;Can one change the mouse pointer in Forms?&lt;/a&gt;&lt;br /&gt;The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow one to change the mouse pointer. Eg:&lt;br /&gt;SET_APPLICATION_PROPERTY(CURSOR_STYLE, BUSY);&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;Why doesn't my messages show on the screen?&lt;br /&gt;Regardless of whether you call the MESSAGE() built-in with ACKNOWLEDGE, NO_ACKNOWLEDGE, or with no mode specification at all, your message may or may not be displayed. This is because messages are displayed asynchronously. To display messages immediately, use the SYNCHRONIZE build-in:&lt;br /&gt;message('...'); synchronize;&lt;br /&gt;This can also be used to execute a query while the user is looking at the results of a previous query.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MENU"&gt;What happened to SQL*Menu?&lt;/a&gt;&lt;br /&gt;From Forms V4.5, SQL*Menu is fully integrated into Oracle Forms. Application menus can be added to your application by creating Menu Modules (*.MMB) and generate it to Menu Module Executables (*.MMX).&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="TOOLBAR"&gt;How does one create a custom toolbar?&lt;/a&gt;&lt;br /&gt;Create a new block, let's name it "TOOLBAR" and a canvas named "C_TOOLBAR" (for ilustration purposes). Put some iconic buttons on your canvas. Use the following properties for these buttons:&lt;br /&gt;·  Enabled: True&lt;br /&gt;·  Navigable: False&lt;br /&gt;·  Mouse Navigate: False&lt;br /&gt;Now set the "Canvas Type" in the canvas property palette to "Horizontal Toolbar" and the "Form Horizontal Toolbar Canvas" in the module property palette to your canvas name (C_TOOLBAR in our case).&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MSHELP"&gt;How does one compile MS Help files?&lt;/a&gt;&lt;br /&gt;The Microsoft Help Compiler does not ship with Designer/2000 or Developer/2000, but you can download it from here:&lt;br /&gt;&lt;a href="http://www.u-net.com/eon/easyhelp/hcpsites.htm"&gt;Help Compiler - FTP Sites&lt;/a&gt;&lt;br /&gt;Note: Designer/2000 includes a Help Generator that can generate source files for the Help Compiler.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="FILEIO"&gt;How can I read/write OS Files from Forms?&lt;/a&gt;&lt;br /&gt;OS files can be read/written from Forms using the TEXT_IO package in Forms. The TEXT_IO package has a datatype FILE_HANDLE. It also has procedures FCLOSE, GET_LINE, NEW_LINE, PUT, PUT_LINE &amp;amp; PUTF and a function FOPEN. Example:&lt;br /&gt;        DECLARE&lt;br /&gt;           file1  TEXT_IO.FILE_TYPE;&lt;br /&gt;           file2  TEXT_IO.FILE_TYPE;&lt;br /&gt;           str    VARCHAR2(80);&lt;br /&gt;        BEGIN&lt;br /&gt;           file1 := TEXT_IO.FOPEN( 'input.txt','r' );&lt;br /&gt;           file2 := TEXT_IO.FOPEN( 'output.txt', 'w' );&lt;br /&gt;           TEXT_IO.GET_LINE( file1, str );&lt;br /&gt;           TEXT_IO.PUT_LINE( file2, str );&lt;br /&gt;           TEXT_IO.FCLOSE( file1 );&lt;br /&gt;           TEXT_IO.FCLOSE( file2 );&lt;br /&gt;        END;&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="BATCH"&gt;How can I generate all my forms in a batch?&lt;/a&gt;&lt;br /&gt;@echo off&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.  FMXGNALL.BAT&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.&lt;br /&gt;@echo.  Create runtime FMXs from source FMBs&lt;br /&gt;@echo.  Will convert ALL of the fmbs in the current direcotry&lt;br /&gt;@echo.  Usage : FMXALL.BAT username/password@connect string&lt;br /&gt;@echo.&lt;br /&gt;@echo. +----------------------------------------------------------&lt;br /&gt;@echo.&lt;br /&gt;@echo. Username/Password@connect_string = %1&lt;br /&gt;@echo.&lt;br /&gt;&lt;br /&gt;IF %1 == "" GOTO END&lt;br /&gt;&lt;br /&gt;@echo Removing old FMX files&lt;br /&gt;del *.fmx&lt;br /&gt;&lt;br /&gt;@echo Creating the new FMX files&lt;br /&gt;rem Change f45gen32 to f45gen if in 16 bit environment.&lt;br /&gt;FOR %%F in (*.fmb) DO start /w f45gen32 userid=%1 batch=y module=%%F&lt;br /&gt;&lt;br /&gt;@echo.&lt;br /&gt;@echo Done!!! Remember to move the FMX files into your runtime directory.&lt;br /&gt;@echo.&lt;br /&gt;&lt;br /&gt;:END&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="UNIX"&gt;How does one get a form to run on Unix?&lt;/a&gt;&lt;br /&gt;You need to design your form on your workstation. FTP or copy the Forms's FMB file to the Unix box. If you generate for a terminal environment (character based), the syntax is:&lt;br /&gt;   f45gen USERID=userid/passwd@db_name MODULE_TYPE=FORM MODULE=module_name&lt;br /&gt;If you want to generate a Library file, replace FORM with LIBRARY. Use f45genm to generate your form in a Motif environment.&lt;br /&gt;Use the "f45run" command to run your form.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqfrm45.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="FORMS3"&gt;Why do terminal users hate Forms?&lt;/a&gt;&lt;br /&gt;Most Unix, MVS and VMS users do not like Forms 4.5/ 5.0 for a couple of reasons:&lt;br /&gt;You need to design on a PC and frequently get compatibility problems (font scaling, etc);&lt;br /&gt;Forms 4.5 is no improvement for Forms 3.0 terminal users at all, rather it is a step backwards;&lt;br /&gt;Forms 4.5 uses too much memory and executables are about 400% larger than for its 3.0 counter part;&lt;br /&gt;The largest Oracle Forms customers still runs on Forms V3.0 and will rather throw out Oracle than to convert to Forms 4.5.&lt;br /&gt;I think Oracle should bring SQL*Forms v3.0 back for terminal users. They could rename the product to Oracle Forms for Terminals, or something.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                  REPORTS&lt;br /&gt;&lt;br /&gt;·  &lt;a name="PRNTCOND"&gt;What exactly does the "Print Condition" do?&lt;/a&gt;&lt;br /&gt;The print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.&lt;br /&gt;As an example, assume we have created a field inside a repeating frame with Print Condition Object set to 'anchoring object', and Print Condition Type set to 'All But First'. On every instance of that repeating frame which is printed entirely within a single page, our object will not print. However, if an instance of that frame spans more than one page then our object will print on the second and every subsequent page that this instance of the repeating frame spans.&lt;br /&gt;For most objects you will not have to play with this print condition setting as the default setting is pretty good at determining what pages to print on, even though it only chooses between 'first' and 'last'. Only such things as heading objects you want reprinted on multiple pages are normally candidates for fooling around with this setting.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqrep.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="DYNWHERE"&gt;How do I create a truly dynamic 'where' condition which the user can input on the parameter form for my select statement&lt;/a&gt;&lt;br /&gt;While setting a simple parameter for use in defining the select statement, such as a date, bill_period_id etc. is simple, there are times when you may wish to allow a user to add any "where" statement they wish. However, if you create a varchar user variable and try to reference it as an SQL condition ( e.g. Select * from account where :usercondition) you will get an error. The secret is that the variable must be initialized to a valid SQL condition before the Data Model will accept it. This is done in the "Initial Value" spot on the variable's properties form. The usual default is "1 = 1" which simply means all rows meeting whatever other conditions are included in the select statement will pass this condition if the user does not change it in the parameter form.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqrep.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MODLAYOUT"&gt;How do I change a user parameter at runtime from a layout object trigger?&lt;/a&gt;&lt;br /&gt;Quite simply, you can't. Once the BeforeReport trigger has fired, Reports locks down the user parameters until the report is finished. Oh, I know you can put a statement into a layout trigger at design time and the compiler will accept it, but the moment you run the report you will get a nasty error and the report will die. Why they couldn't catch those problems at compile time I have no idea, except that it probably uses the same PL/SQL compiler as Forms which uses that same syntax for the perfectly acceptable function of changing field values.&lt;br /&gt;That being said, there is valid technique to mimic having a user variable which can be changed over the course of the report execution. What you have to do is create a PL/SQL package that contains a variable as well as the functions to read and write to that variable. Since variables inside a package are both local to that package and persistent over the duration of the run, you use this to save and change your variable value. I know that this seems like overkill, but it is the most efficient way of handling an issue that is very rarely encountered. As you can probably guess, this technique is a last resort to finding an SQL work around if one exists.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqrep.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="SETINIT"&gt;How do I set the initial values of parameters for the parameter form at runtime?&lt;/a&gt;&lt;br /&gt;This is what the BeforeForm trigger is primarily used for. Even if you have used a select statement to create a lookup list for the parameter, this statement is fully parsed before the parameter form is opened. Simply setting the parameter to a given value in the BeforeForm trigger will select that option as the default value displayed to the user. For example, assume you have a parameter called p_input_date which is intended to hold an invoice date. The following example will select the most recent invoice date as the default, and note that it properly handles exceptions to ensure that the report does not arbitrarily die if this default setting fails. Note also that like all report triggers, it must return a true or false value.&lt;br /&gt;function BeforePForm return boolean is&lt;br /&gt;begin&lt;br /&gt;select max(bill_period_end_date + 1)&lt;br /&gt;  into :p_input_date&lt;br /&gt;  from billing_period&lt;br /&gt; where bill_period_end_date &lt;= (select trunc(sysdate)&lt;br /&gt;                                  from dual);&lt;br /&gt;  return (TRUE);&lt;br /&gt;exception&lt;br /&gt;  when others then&lt;br /&gt;     :p_input_date := null;&lt;br /&gt;     return true;&lt;br /&gt;end;&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqrep.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="CHANGEALL"&gt;Why can't I highlight a bunch of fields and change all their format masks or print conditions at once?&lt;/a&gt;&lt;br /&gt;You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.&lt;br /&gt;·  &lt;a href="http://www.blacksheepnetworks.com/security/resources/oracle/faqrep.htm#TopOfFile#TopOfFile"&gt;Back to top of file&lt;/a&gt;&lt;br /&gt;&lt;a name="MODFIELD"&gt;How do I change the printed value of a field at runtime?&lt;/a&gt;&lt;br /&gt;Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value. That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure. The syntax is SRW.Set_Field_char(0,) and the output of the object that the current trigger is attached to will be replaced by . There are also SRW.set_fileld_num, and SRW.set_field_date for numeric or date fields.&lt;br /&gt;While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-4056024082660480962?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/4056024082660480962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=4056024082660480962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/4056024082660480962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/4056024082660480962'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/why-should-i-save-my-forms-in-database.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-7897676775754606240</id><published>2008-04-30T04:13:00.000-03:00</published><updated>2008-04-30T04:15:21.691-03:00</updated><title type='text'></title><content type='html'>PL/SQL tables are PL/SQL’s way of providing arrays. Arrays are like tem-porary&lt;br /&gt;tables in memory and thus are processed very quickly. It is impor-tant&lt;br /&gt;for you to realize that they are not database tables, and DML&lt;br /&gt;statements cannot be issued against them. This type of table is indexed&lt;br /&gt;by a binary integer counter (it cannot be indexed by another type of&lt;br /&gt;number) whose value can be referenced using the number of the index.&lt;br /&gt;Remember that PL/SQL tables exist in memory only, and therefore don’t&lt;br /&gt;exist in any persistent way, disappearing after the session ends.&lt;br /&gt;A PL/SQL TABLE DECLARATION&lt;br /&gt;There are two steps in the declaration of a PL/SQL table. First, you must&lt;br /&gt;define the table structure using the TYPE statement. Second, once a table&lt;br /&gt;type is created, you then declare the actual table.&lt;br /&gt;FOR EXAMPLE&lt;br /&gt;DECLARE&lt;br /&gt;-- Table structure definition&lt;br /&gt;TYPE NameType IS TABLE OF&lt;br /&gt;Customer.name_name%TYPE&lt;br /&gt;INDEX BY BINARY_INTEGER;&lt;br /&gt;-- Create the actual table&lt;br /&gt;CnameTab NameType;&lt;br /&gt;KnameTab NameType;&lt;br /&gt;BEGIN&lt;br /&gt;NULL; -- ...&lt;br /&gt;END;&lt;br /&gt;REFERENCING AND MODIFYING PL/SQL&lt;br /&gt;TABLE ROWS&lt;br /&gt;In order to specify a particular row in a PL/SQL table, you must name the&lt;br /&gt;table and the index.&lt;br /&gt;Syntax: &lt;table_name&gt; (&lt;index_value&gt;)&lt;br /&gt;The datatype of the index value must be compatible with the&lt;br /&gt;BINARY_INTEGER datatype. You assign values to a row using the stan-dard&lt;br /&gt;assignment operator.&lt;br /&gt;Referencing a nonexistent row raises the NO_DATA_FOUND exception.&lt;br /&gt;FOR EXAMPLE&lt;br /&gt;SET SERVEROUTPUT ON;&lt;br /&gt;DECLARE&lt;br /&gt;CURSOR c_cname IS&lt;br /&gt;SELECT cust_name, Cust_no, ROWNUM&lt;br /&gt;FROM customers&lt;br /&gt;ORDER BY cust_name;&lt;br /&gt;TYPE type_cname_tab IS TABLE OF customers.cust_name%TYPE&lt;br /&gt;INDEX BY BINARY_INTEGER;&lt;br /&gt;tab_cname type_cname_tab;&lt;br /&gt;v_cname_counter NUMBER := 0;&lt;br /&gt;BEGIN&lt;br /&gt;FOR r_cname IN c_cname&lt;br /&gt;LOOP&lt;br /&gt;v_cname_counter := v_cname_counter + 1;&lt;br /&gt;tab_cname(v_cname_counter):= r_cname.cust_name;&lt;br /&gt;END LOOP;&lt;br /&gt;FOR i_cname IN 1 .. v_cname_counter&lt;br /&gt;LOOP&lt;br /&gt;DBMS_OUTPUT.PUT_LINE('Here is a last name: ' Tab_cname(i_cname));&lt;br /&gt;END LOOP;&lt;br /&gt;END;&lt;br /&gt;PL/SQL TABLE ATTRIBUTES&lt;br /&gt;Here are seven PL/SQL table attributes you can use to gain information&lt;br /&gt;about a PL/SQL table or to modify a row in a PL/SQL table:&lt;br /&gt;• DELETE—Deletes rows in a table.&lt;br /&gt;• EXISTS—Return TRUE if the specified entry exists in the table.&lt;br /&gt;• COUNT—Returns the number of rows in the table.&lt;br /&gt;• FIRST—Returns the index of the first row in the table.&lt;br /&gt;• LAST—Returns the index of the last row in the table.&lt;br /&gt;• NEXT—Returns the index of the next row in the table after the&lt;br /&gt;specified row.&lt;br /&gt;• PRIOR—Returns the index of the previous row in the table be-fore&lt;br /&gt;the specified row.&lt;br /&gt;PL/SQL table attributes are used with the following syntax:&lt;br /&gt;&lt;table_name&gt;.&lt;attribute&gt;&lt;br /&gt;If you declare a PL/SQL table named t_customer then you get a rowcount&lt;br /&gt;for the table as follows:&lt;br /&gt;v_count := t_customer.count;&lt;br /&gt;The DELETE and EXISTS attributes function differently than the other attributes.&lt;br /&gt;These two generally operate on one row at a time, so you must&lt;br /&gt;add the following syntax:&lt;br /&gt;&lt;tablename&gt;.&lt;attribute&gt;(&lt;indexnumber&gt;[,&lt;indexnumber&gt;])&lt;br /&gt;t.customer.delete deletes all rows from the t_customer table, whereas&lt;br /&gt;t_customer.delete(15) deletes the fifteenth row of the t_customer table.&lt;br /&gt;Likewise, t_customer.exists(10) returns a value of true if there is a one-hundredth row and a value of false if there is not.&lt;br /&gt;The EXISTS attribute can be used to determine if a particular index value&lt;br /&gt;exists in the PL/SQL table or not.&lt;br /&gt;FOR EXAMPLE&lt;br /&gt;DECLARE&lt;br /&gt;TYPE t_czip_type IS TABLE OF&lt;br /&gt;customers.post_code%TYPE&lt;br /&gt;INDEX BY BINARY_INTEGER;&lt;br /&gt;t_czip t_czip_type;&lt;br /&gt;v_czip_index BINARY_INTEGER;&lt;br /&gt;BEGIN&lt;br /&gt;t_czip(11203) := ‘nyc’;&lt;br /&gt;t_czip(11201) := ‘Brkl’;&lt;br /&gt;t_czip(49341) := ‘SF’;&lt;br /&gt;BEGIN&lt;br /&gt;v_czip_index := t_czip.first;&lt;br /&gt;LOOP&lt;br /&gt;DBMS_OUTPUT.PUT_LINE(t_czip(v_czip_index));&lt;br /&gt;EXIT WHEN v_czip_index = t_czip.LAST;&lt;br /&gt;v_czip_index := t_czip.NEXT(v_czip_index);&lt;br /&gt;END LOOP;&lt;br /&gt;RAISE NO_DATA_FOUND;&lt;br /&gt;EXCEPTION&lt;br /&gt;WHEN NO_DATA_FOUND&lt;br /&gt;THEN&lt;br /&gt;DBMS_OUTPUT.PUT_LINE&lt;br /&gt;(‘The last zipcode has been reached.’&lt;br /&gt;);&lt;br /&gt;END;&lt;br /&gt;END;&lt;br /&gt;What is PL/SQL and what is it used for?&lt;br /&gt;SQL is a declarative language that allows database programmers to write a SQL declaration and hand it to the database for execution. As such, SQL cannot be used to execute procedural code with conditional, iterative and sequential statements. To overcome this limitation, PL/SQL was created.&lt;br /&gt;PL/SQL is Oracle's Procedural Language extension to SQL. PL/SQL's language syntax, structure and data types are similar to that of &lt;a title="Ada" href="http://www.orafaq.com/wiki/Ada"&gt;Ada&lt;/a&gt;. Some of the statements provided by PL/SQL:&lt;br /&gt;Conditional Control Statements:&lt;br /&gt;IF ... THEN ... ELSIF ... ELSE ... END IF;&lt;br /&gt;CASE ... WHEN ... THEN ... ELSE ... END CASE;&lt;br /&gt;Iterative Statements:&lt;br /&gt;LOOP ... END LOOP;&lt;br /&gt;WHILE ... LOOP ... END LOOP;&lt;br /&gt;FOR ... IN [REVERSE] ... LOOP ... END LOOP;&lt;br /&gt;Sequential Control Statements:&lt;br /&gt;GOTO ...;&lt;br /&gt;NULL;&lt;br /&gt;The PL/SQL language includes object oriented programming techniques such as encapsulation, function overloading, information hiding (all but inheritance).&lt;br /&gt;PL/SQL is commonly used to write data-centric programs to manipulate data in an Oracle database.&lt;br /&gt;Example PL/SQL blocks:&lt;br /&gt;/* Remember to SET SERVEROUTPUT ON to see the output */&lt;br /&gt;BEGIN&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE('Hello World');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;BEGIN&lt;br /&gt;  -- A PL/SQL cursor&lt;br /&gt;  FOR cursor1 IN (SELECT * FROM table1) -- This is an embedded SQL statement&lt;br /&gt;  LOOP&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('Column 1 = '  cursor1.column1&lt;br /&gt;                       ', Column 2 = '  cursor1.column2);&lt;br /&gt;  END LOOP;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: What is the difference between SQL and PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=2"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="What_is_the_difference_between_SQL_and_P"&gt;&lt;/a&gt;What is the difference between SQL and PL/SQL?&lt;br /&gt;Both SQL and PL/SQL are languages used to access data within Oracle databases.&lt;br /&gt;SQL is a limited language that allows you to directly interact with the database. You can write queries (SELECT), manipulate objects (DDL) and data (DML) with SQL. However, SQL doesn't include all the things that normal programming languages have, such as loops and IF...THEN...ELSE statements.&lt;br /&gt;PL/SQL is a normal programming language that includes all the features of most other programming languages. But, it has one thing that other programming languages don't have: the ability to easily integrate with SQL.&lt;br /&gt;Some of the differences:&lt;br /&gt;SQL is executed one statement at a time. PL/SQL is executed as a block of code.&lt;br /&gt;SQL tells the database what to do (declarative), not how to do it. In contrast, PL/SQL tell the database how to do things (procedural).&lt;br /&gt;SQL is used to code queries, DML and DDL statements. PL/SQL is used to code program blocks, triggers, functions, procedures and packages.&lt;br /&gt;You can embed SQL in a PL/SQL program, but you cannot embed PL/SQL within a SQL statement.&lt;br /&gt;[&lt;a title="Edit section: Should one use PL/SQL or Java to code procedures and triggers?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=3"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Should_one_use_PL.2FSQL_or_Java_to_code_"&gt;&lt;/a&gt;Should one use PL/SQL or Java to code procedures and triggers?&lt;br /&gt;Both PL/SQL and Java can be used to create Oracle stored procedures and triggers. This often leads to questions like "Which of the two is the best?" and "Will Oracle ever desupport PL/SQL in favour of Java?".&lt;br /&gt;Many Oracle applications are based on PL/SQL and it would be difficult of Oracle to ever desupport PL/SQL. In fact, all indications are that PL/SQL still has a bright future ahead of it. Many enhancements are still being made to PL/SQL. For example, Oracle 9i supports native compilation of Pl/SQL code to binaries. Not to mention the numerous PL/SQL enhancements made in Oracle 10g and 11g.&lt;br /&gt;PL/SQL and Java appeal to different people in different job roles. The following table briefly describes the similarities and difference between these two language environments:&lt;br /&gt;PL/SQL:&lt;br /&gt;Can be used to create Oracle packages, procedures and triggers&lt;br /&gt;Data centric and tightly integrated into the database&lt;br /&gt;Proprietary to Oracle and difficult to port to other database systems&lt;br /&gt;Data manipulation is slightly faster in PL/SQL than in Java&lt;br /&gt;Easier to use than Java (depending on your background)&lt;br /&gt;Pl/SQL is a traditional procedural programming language&lt;br /&gt;Java:&lt;br /&gt;Can be used to create Oracle packages, procedures and triggers&lt;br /&gt;Open standard, not proprietary to Oracle&lt;br /&gt;Incurs some data conversion overhead between the Database and Java type systems&lt;br /&gt;Java is more difficult to use (depending on your background)&lt;br /&gt;Java is an Object Orientated language, and modules are structured into classes&lt;br /&gt;Java can be used to produce complete applications&lt;br /&gt;PS: Starting with Oracle 10g, .NET procedures can also be stored within the database (Windows only). Nevertheless, unlike PL/SQL and JAVA, .NET code is not usable on non-Windows systems.&lt;br /&gt;[&lt;a title="Edit section: How can one see if somebody modified any code?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=4"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_can_one_see_if_somebody_modified_any"&gt;&lt;/a&gt;How can one see if somebody modified any code?&lt;br /&gt;The source code for stored procedures, functions and packages are stored in the Oracle Data Dictionary. One can detect code changes by looking at the TIMESTAMP and LAST_DDL_TIME column in the USER_OBJECTS dictionary view. Example:&lt;br /&gt;SELECT OBJECT_NAME,&lt;br /&gt;       TO_CHAR(CREATED,       'DD-Mon-RR HH24:MI') CREATE_TIME,&lt;br /&gt;       TO_CHAR(LAST_DDL_TIME, 'DD-Mon-RR HH24:MI') MOD_TIME,&lt;br /&gt;       STATUS&lt;br /&gt;FROM   USER_OBJECTS&lt;br /&gt;WHERE  LAST_DDL_TIME &gt; '&amp;amp;CHECK_FROM_DATE';&lt;br /&gt;Note: If you recompile an object, the LAST_DDL_TIME column is updated, but the TIMESTAMP column is not updated. If you modified the code, both the TIMESTAMP and LAST_DDL_TIME columns are updated.&lt;br /&gt;[&lt;a title="Edit section: How can one search PL/SQL code for a string/ key value?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=5"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_can_one_search_PL.2FSQL_code_for_a_s"&gt;&lt;/a&gt;How can one search PL/SQL code for a string/ key value?&lt;br /&gt;The following query is handy if you want to know where certain tables, columns and expressions are referenced in your PL/SQL source code.&lt;br /&gt;SELECT type, name, line&lt;br /&gt;  FROM   user_source&lt;br /&gt; WHERE  UPPER(text) LIKE '%&amp;amp;KEYWORD%';&lt;br /&gt;If you run the above query from SQL*Plus, enter the string you are searching for when promted for KEYWORD. If not, replace &amp;amp;KEYWORD with the string you are searching for.&lt;br /&gt;[&lt;a title="Edit section: How can one keep a history of PL/SQL code changes?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=6"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_can_one_keep_a_history_of_PL.2FSQL_c"&gt;&lt;/a&gt;How can one keep a history of PL/SQL code changes?&lt;br /&gt;One can build a history of PL/SQL code changes by setting up an AFTER CREATE schema (or database) level trigger (available from Oracle 8.1.7). This way one can easily revert to previous code should someone make any catastrophic changes. Look at this example:&lt;br /&gt;CREATE TABLE SOURCE_HIST                    -- Create history table&lt;br /&gt;  AS SELECT SYSDATE CHANGE_DATE, USER_SOURCE.*&lt;br /&gt;  FROM   USER_SOURCE WHERE 1=2;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE TRIGGER change_hist        -- Store code in hist table&lt;br /&gt;  AFTER CREATE ON SCOTT.SCHEMA          -- Change SCOTT to your schema name&lt;br /&gt;DECLARE&lt;br /&gt;BEGIN&lt;br /&gt;  if DICTIONARY_OBJ_TYPE in ('PROCEDURE', 'FUNCTION',&lt;br /&gt;                             'PACKAGE', 'PACKAGE BODY', 'TYPE') then&lt;br /&gt;     -- Store old code in SOURCE_HIST table&lt;br /&gt;     INSERT INTO SOURCE_HIST&lt;br /&gt;            SELECT sysdate, user_source.* FROM USER_SOURCE&lt;br /&gt;             WHERE  TYPE = DICTIONARY_OBJ_TYPE&lt;br /&gt;               AND  NAME = DICTIONARY_OBJ_NAME;&lt;br /&gt;  end if;&lt;br /&gt;EXCEPTION&lt;br /&gt;  WHEN OTHERS THEN&lt;br /&gt;       raise_application_error(-20000, SQLERRM);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;show errors&lt;br /&gt;A better approach is to create an external CVS or SVN archive for the scripts that installs the PL/SQL code. The canonical version of what's in the database must match the latest CVS/SVN version or else someone would be cheating.&lt;br /&gt;[&lt;a title="Edit section: How can I protect my PL/SQL source code?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=7"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_can_I_protect_my_PL.2FSQL_source_cod"&gt;&lt;/a&gt;How can I protect my PL/SQL source code?&lt;br /&gt;Oracle provides a binary wrapper utility that can be used to scramble PL/SQL source code. This utility was introduced in Oracle7.2 (PL/SQL V2.2) and is located in the ORACLE_HOME/bin directory.&lt;br /&gt;The utility use human-readable PL/SQL source code as input, and writes out portable binary object code (somewhat larger than the original). The binary code can be distributed without fear of exposing your proprietary algorithms and methods. Oracle will still understand and know how to execute the code. Just be careful, there is no "decode" command available. So, don't lose your source!&lt;br /&gt;The syntax is:&lt;br /&gt;wrap iname=myscript.pls oname=xxxx.plb&lt;br /&gt;Please note: there is no way to unwrap a *.plb binary file. You are supposed to backup and keep your *.pls source files after wrapping them.&lt;br /&gt;[&lt;a title="Edit section: Can one print to the screen from PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=8"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_print_to_the_screen_from_PL.2FSQ"&gt;&lt;/a&gt;Can one print to the screen from PL/SQL?&lt;br /&gt;One can use the DBMS_OUTPUT package to write information to an output buffer. This buffer can be displayed on the screen from SQL*Plus if you issue the SET SERVEROUTPUT ON; command. For example:&lt;br /&gt;set serveroutput on&lt;br /&gt;begin&lt;br /&gt;   dbms_output.put_line('Look Ma, I can print from PL/SQL!!!');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;DBMS_OUTPUT is useful for debugging PL/SQL programs. However, if you print too much, the output buffer will overflow. In that case, set the buffer size to a larger value, eg.: set serveroutput on size 200000&lt;br /&gt;If you forget to set serveroutput on type SET SERVEROUTPUT ON once you remember, and then EXEC NULL;. If you haven't cleared the DBMS_OUTPUT buffer with the disable or enable procedure, SQL*Plus will display the entire contents of the buffer when it executes this dummy PL/SQL block.&lt;br /&gt;Note that DBMS_OUTPUT doesn't print blank or NULL lines. To overcome this problem, SET SERVEROUTPUT ON FORMAT WRAP; Look at this example with this option first disabled and then enabled:&lt;br /&gt;SQL&gt; SET SERVEROUTPUT ON&lt;br /&gt;SQL&gt; begin&lt;br /&gt;  2    dbms_output.put_line('The next line is blank');&lt;br /&gt;  3    dbms_output.put_line();&lt;br /&gt;  4    dbms_output.put_line('The above line should be blank');&lt;br /&gt;  5  end;&lt;br /&gt;  6  /&lt;br /&gt;The next line is blank&lt;br /&gt;The above line should be blank&lt;br /&gt;SQL&gt; SET SERVEROUTPUT ON FORMAT WRAP&lt;br /&gt;SQL&gt; begin&lt;br /&gt;  2    dbms_output.put_line('The next line is blank');&lt;br /&gt;  3    dbms_output.put_line();&lt;br /&gt;  4    dbms_output.put_line('The above line should be blank');&lt;br /&gt;  5  end;&lt;br /&gt;  6  /&lt;br /&gt;The next line is blank&lt;br /&gt;&lt;br /&gt;The above line should be blank&lt;br /&gt;[&lt;a title="Edit section: Can one read/write files from PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=9"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_read.2Fwrite_files_from_PL.2FSQL"&gt;&lt;/a&gt;Can one read/write files from PL/SQL?&lt;br /&gt;The UTL_FILE database package can be used to read and write operating system files.&lt;br /&gt;A DBA user needs to grant you access to read from/ write to a specific directory before using this package. Here is an example:&lt;br /&gt;CONNECT / AS SYSDBA&lt;br /&gt;CREATE OR REPLACE DIRECTORY mydir AS '/tmp';&lt;br /&gt;GRANT read, write ON DIRECTORY mydir TO scott;&lt;br /&gt;Provide user access to the UTL_FILE package (created by catproc.sql):&lt;br /&gt;GRANT EXECUTE ON UTL_FILE TO scott;&lt;br /&gt;Copy and paste these examples to get you started:&lt;br /&gt;Write File&lt;br /&gt;DECLARE&lt;br /&gt;  fHandler UTL_FILE.FILE_TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;  fHandler := UTL_FILE.FOPEN('MYDIR', 'myfile', 'w');&lt;br /&gt;  UTL_FILE.PUTF(fHandler, 'Look ma, Im writing to a file!!!\n');&lt;br /&gt;  UTL_FILE.FCLOSE(fHandler);&lt;br /&gt;EXCEPTION&lt;br /&gt;  WHEN utl_file.invalid_path THEN&lt;br /&gt;     raise_application_error(-20000, 'Invalid path. Create directory or set UTL_FILE_DIR.');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;Read File&lt;br /&gt;DECLARE&lt;br /&gt;  fHandler UTL_FILE.FILE_TYPE;&lt;br /&gt;  buf      varchar2(4000);&lt;br /&gt;BEGIN&lt;br /&gt;  fHandler := UTL_FILE.FOPEN('MYDIR', 'myfile', 'r');&lt;br /&gt;  UTL_FILE.GET_LINE(fHandler, buf);&lt;br /&gt;  dbms_output.put_line('DATA FROM FILE: 'buf);&lt;br /&gt;  UTL_FILE.FCLOSE(fHandler);&lt;br /&gt;EXCEPTION&lt;br /&gt;  WHEN utl_file.invalid_path THEN&lt;br /&gt;     raise_application_error(-20000, 'Invalid path. Create directory or set UTL_FILE_DIR.');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;NOTE: UTL_FILE was introduced with Oracle 7.3. Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUT with the SQL*Plus SPOOL command.&lt;br /&gt;[&lt;a title="Edit section: Can one call DDL statements from PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=10"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_call_DDL_statements_from_PL.2FSQ"&gt;&lt;/a&gt;Can one call DDL statements from PL/SQL?&lt;br /&gt;One can call DDL statements like CREATE, DROP, TRUNCATE, etc. from PL/SQL by using the "EXECUTE IMMEDIATE" statement (native SQL). Examples:&lt;br /&gt;begin&lt;br /&gt;  EXECUTE IMMEDIATE 'CREATE TABLE X(A DATE)';&lt;br /&gt;end;&lt;br /&gt;begin execute Immediate 'TRUNCATE TABLE emp'; end;&lt;br /&gt;DECLARE&lt;br /&gt;  var VARCHAR2(100);&lt;br /&gt;BEGIN&lt;br /&gt;  var := 'CREATE TABLE temp1(col1 NUMBER(2))';&lt;br /&gt;  EXECUTE IMMEDIATE var;&lt;br /&gt;END;&lt;br /&gt;NOTE: The DDL statement in quotes should not be terminated with a semicolon.&lt;br /&gt;Users running Oracle versions below Oracle 8i can look at the &lt;a title="DBMS SQL" href="http://www.orafaq.com/wiki/index.php?title=DBMS_SQL&amp;amp;action=edit"&gt;DBMS_SQL&lt;/a&gt; package (see FAQ about Dynamic SQL).&lt;br /&gt;[&lt;a title="Edit section: Can one use dynamic SQL statements from PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=11"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_use_dynamic_SQL_statements_from_"&gt;&lt;/a&gt;Can one use dynamic SQL statements from PL/SQL?&lt;br /&gt;Starting from Oracle8i one can use the "EXECUTE IMMEDIATE" statement to execute dynamic SQL and PL/SQL statements (statements created at run-time). Look at these examples. Note that the statements within quotes are NOT semicolon terminated:&lt;br /&gt;EXECUTE IMMEDIATE 'CREATE TABLE x (a NUMBER)';&lt;br /&gt;&lt;br /&gt;-- Using bind variables...&lt;br /&gt;sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';&lt;br /&gt;EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;&lt;br /&gt;&lt;br /&gt;-- Returning a cursor...&lt;br /&gt;sql_stmt := 'SELECT * FROM emp WHERE empno = :id';&lt;br /&gt;EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;&lt;br /&gt;One can also use the older DBMS_SQL package (V2.1 and above) to execute dynamic statements. Look at these examples:&lt;br /&gt;CREATE OR REPLACE PROCEDURE DYNSQL AS&lt;br /&gt;  cur integer;&lt;br /&gt;  rc  integer;&lt;br /&gt;BEGIN&lt;br /&gt;  cur := DBMS_SQL.OPEN_CURSOR;&lt;br /&gt;  DBMS_SQL.PARSE(cur, 'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);&lt;br /&gt;  rc := DBMS_SQL.EXECUTE(cur);&lt;br /&gt;  DBMS_SQL.CLOSE_CURSOR(cur);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;More complex DBMS_SQL example using bind variables:&lt;br /&gt;CREATE OR REPLACE PROCEDURE DEPARTMENTS(NO IN DEPT.DEPTNO%TYPE) AS&lt;br /&gt;  v_cursor integer;&lt;br /&gt;  v_dname  char(20);&lt;br /&gt;  v_rows   integer;&lt;br /&gt;BEGIN&lt;br /&gt;  v_cursor := DBMS_SQL.OPEN_CURSOR;&lt;br /&gt;  DBMS_SQL.PARSE(v_cursor, 'select dname from dept where deptno &gt; :x', DBMS_SQL.V7);&lt;br /&gt;  DBMS_SQL.BIND_VARIABLE(v_cursor, ':x', no);&lt;br /&gt;  DBMS_SQL.DEFINE_COLUMN_CHAR(v_cursor, 1, v_dname, 20);&lt;br /&gt;  v_rows := DBMS_SQL.EXECUTE(v_cursor);&lt;br /&gt;  loop&lt;br /&gt;    if DBMS_SQL.FETCH_ROWS(v_cursor) = 0 then&lt;br /&gt;       exit;&lt;br /&gt;    end if;&lt;br /&gt;    DBMS_SQL.COLUMN_VALUE_CHAR(v_cursor, 1, v_dname);&lt;br /&gt;    DBMS_OUTPUT.PUT_LINE('Deptartment name: 'v_dname);&lt;br /&gt;  end loop;&lt;br /&gt;  DBMS_SQL.CLOSE_CURSOR(v_cursor);&lt;br /&gt;EXCEPTION&lt;br /&gt;  when others then&lt;br /&gt;       DBMS_SQL.CLOSE_CURSOR(v_cursor);&lt;br /&gt;       raise_application_error(-20000, 'Unknown Exception Raised: 'sqlcode' 'sqlerrm);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: What is the difference between %TYPE and %ROWTYPE?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=12"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="What_is_the_difference_between_.25TYPE_a"&gt;&lt;/a&gt;What is the difference between %TYPE and %ROWTYPE?&lt;br /&gt;Both %TYPE and %ROWTYPE are used to define variables in PL/SQL as it is defined within the database. If the datatype or precision of a column changes, the program automically picks up the new definition from the database without having to make any code changes.&lt;br /&gt;The %TYPE and %ROWTYPE constructs provide data independence, reduces maintenance costs, and allows programs to adapt as the database changes to meet new business needs.&lt;br /&gt;%TYPE&lt;br /&gt;%TYPE is used to declare a field with the same type as that of a specified table's column. Example:&lt;br /&gt;DECLARE&lt;br /&gt;   v_EmpName  emp.ename%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;   SELECT ename INTO v_EmpName FROM emp WHERE ROWNUM = 1;&lt;br /&gt;   DBMS_OUTPUT.PUT_LINE('Name = '  v_EmpName);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;%ROWTYPE&lt;br /&gt;%ROWTYPE is used to declare a record with the same types as found in the specified database table, view or cursor. Examples:&lt;br /&gt;DECLARE&lt;br /&gt;  v_emp emp%ROWTYPE;&lt;br /&gt;BEGIN&lt;br /&gt;  v_emp.empno := 10;&lt;br /&gt;  v_emp.ename := 'XXXXXXX';&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: What is the result of comparing NULL with NULL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=13"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="What_is_the_result_of_comparing_NULL_wit"&gt;&lt;/a&gt;What is the result of comparing NULL with NULL?&lt;br /&gt;&lt;a title="NULL" href="http://www.orafaq.com/wiki/NULL"&gt;NULL&lt;/a&gt; is neither equal to NULL, nor it is not equal to NULL. Any comparison to NULL is evaluated to NULL. Look at this code example to convince yourself:&lt;br /&gt;declare&lt;br /&gt;  a number := NULL;&lt;br /&gt;  b number := NULL;&lt;br /&gt;begin&lt;br /&gt;  if a=b then&lt;br /&gt;     dbms_output.put_line('True, NULL = NULL');&lt;br /&gt;  elsif a&lt;&gt;b then&lt;br /&gt;     dbms_output.put_line('False, NULL &lt;&gt; NULL');&lt;br /&gt;  else&lt;br /&gt;     dbms_output.put_line('Undefined NULL is neither = nor &lt;&gt; to NULL');&lt;br /&gt;  end if;&lt;br /&gt;end;&lt;br /&gt;The output would be:&lt;br /&gt;SQL&gt; /&lt;br /&gt;Undefined NULL is neither = nor &lt;&gt; to NULL&lt;br /&gt;PL/SQL procedure successfully completed.[/code]&lt;br /&gt;Workarounds:&lt;br /&gt;Use IS NULL or IS NOT NULL:&lt;br /&gt;declare&lt;br /&gt;  a number := NULL;&lt;br /&gt;  b number := NULL;&lt;br /&gt;begin&lt;br /&gt;  if a IS NULL and b IS NULL then&lt;br /&gt;     dbms_output.put_line('Both values are NULL.');&lt;br /&gt;  end if;&lt;br /&gt;end;&lt;br /&gt;Use the &lt;a title="NVL" href="http://www.orafaq.com/wiki/NVL"&gt;NVL&lt;/a&gt;() or &lt;a title="NVL2" href="http://www.orafaq.com/wiki/NVL2"&gt;NVL2&lt;/a&gt;() function. Example:&lt;br /&gt;declare&lt;br /&gt;  a number := NULL;&lt;br /&gt;  b number := NULL;&lt;br /&gt;begin&lt;br /&gt;  if nvl(a, 99999) = nvl(b, 99999) then&lt;br /&gt;     dbms_output.put_line('Both values are NULL.');&lt;br /&gt;  end if;&lt;br /&gt;end;&lt;br /&gt;DECLARE&lt;br /&gt;  v_EmpRecord  emp%ROWTYPE;&lt;br /&gt;BEGIN&lt;br /&gt;  SELECT * INTO v_EmpRecord FROM emp WHERE ROWNUM = 1;&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE('Name = '  v_EmpRecord.ename);&lt;br /&gt;  DBMS_OUTPUT.PUT_LINE('Salary = '  v_EmpRecord.sal);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: How does one get the value of a sequence into a PL/SQL variable?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=14"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_does_one_get_the_value_of_a_sequence"&gt;&lt;/a&gt;How does one get the value of a sequence into a PL/SQL variable?&lt;br /&gt;As you might know, one cannot use sequences directly from PL/SQL. Oracle (for some silly reason) prohibits this:&lt;br /&gt;i := sq_sequence.NEXTVAL;&lt;br /&gt;However, one can use embedded SQL statements to obtain sequence values:&lt;br /&gt;select sq_sequence.NEXTVAL into :i from dual;&lt;br /&gt;This FAQ was contributed by &lt;a title="mailto:NAIL@XS4ALL.NL" href="mailto:NAIL@XS4ALL.NL"&gt;Ronald van Woensel&lt;/a&gt;&lt;br /&gt;[&lt;a title="Edit section: Can one execute an operating system command from PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=15"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_execute_an_operating_system_comm"&gt;&lt;/a&gt;Can one execute an operating system command from PL/SQL?&lt;br /&gt;There is no direct way to execute operating system commands from PL/SQL. PL/SQL doesn't have a "HOST" command, like in SQL*Plus, that allows users to call OS commands. Nevertheless, the following workarounds can be used:&lt;br /&gt;Database Pipes&lt;br /&gt;Write an external program (using one of the precompiler languages, &lt;a title="OCI" href="http://www.orafaq.com/wiki/OCI"&gt;OCI&lt;/a&gt; or &lt;a title="Perl" href="http://www.orafaq.com/wiki/Perl"&gt;Perl&lt;/a&gt; with Oracle access modules) to act as a listener on a database pipe (SYS.&lt;a title="DBMS PIPE" href="http://www.orafaq.com/wiki/DBMS_PIPE"&gt;DBMS_PIPE&lt;/a&gt;). Your PL/SQL program then put requests to run commands in the pipe, the listener picks it up and run the requests. Results are passed back on a different database pipe. For an &lt;a title="Pro*C" href="http://www.orafaq.com/wiki/Pro%2AC"&gt;Pro*C&lt;/a&gt; example, see chapter 8 of the Oracle Application Developers Guide.&lt;br /&gt;CREATE OR REPLACE FUNCTION host_command( cmd IN VARCHAR2 )&lt;br /&gt;  RETURN INTEGER IS&lt;br /&gt;    status   NUMBER;&lt;br /&gt;    errormsg VARCHAR2(80);&lt;br /&gt;    pipe_name VARCHAR2(30);&lt;br /&gt;BEGIN&lt;br /&gt;  pipe_name := 'HOST_PIPE';&lt;br /&gt;  dbms_pipe.pack_message( cmd );&lt;br /&gt;  status := dbms_pipe.send_message(pipe_name);&lt;br /&gt;  RETURN status;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;External Procedure Listeners:&lt;br /&gt;From &lt;a title="Oracle 8" href="http://www.orafaq.com/wiki/Oracle_8"&gt;Oracle 8&lt;/a&gt; one can call external &lt;a title="3GL" href="http://www.orafaq.com/wiki/3GL"&gt;3GL&lt;/a&gt; code in a dynamically linked library (DLL or shared object). One just write a library in C/ C++ to do whatever is required. Defining this C/C++ function to PL/SQL makes it executable. Look at this &lt;a title="http://www.orafaq.com/scripts/c_src/extproc.txt" href="http://www.orafaq.com/scripts/c_src/extproc.txt"&gt;External Procedure&lt;/a&gt; example.&lt;br /&gt;Using Java&lt;br /&gt;See example at &lt;a title="http://www.orafaq.com/scripts/plsql/oscmd.txt" href="http://www.orafaq.com/scripts/plsql/oscmd.txt"&gt;http://www.orafaq.com/scripts/plsql/oscmd.txt&lt;/a&gt;&lt;br /&gt;DBMS_SCHEDULER&lt;br /&gt;In &lt;a title="Oracle 10g" href="http://www.orafaq.com/wiki/Oracle_10g"&gt;Oracle 10g&lt;/a&gt; and above, one can execute OS commands via the &lt;a title="DBMS SCHEDULER" href="http://www.orafaq.com/wiki/DBMS_SCHEDULER"&gt;DBMS_SCHEDULER&lt;/a&gt; package. Look at this example:&lt;br /&gt;BEGIN&lt;br /&gt;  dbms_scheduler.create_job(job_name        =&gt; 'myjob',&lt;br /&gt;                            job_type        =&gt; 'executable',&lt;br /&gt;                            job_action      =&gt; '/app/oracle/x.sh',&lt;br /&gt;                            enabled         =&gt; TRUE,&lt;br /&gt;                            auto_drop       =&gt; TRUE);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;exec dbms_scheduler.run_job('myjob');&lt;br /&gt;[&lt;a title="Edit section: How does one loop through tables in PL/SQL?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=16"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_does_one_loop_through_tables_in_PL.2"&gt;&lt;/a&gt;How does one loop through tables in PL/SQL?&lt;br /&gt;One can make use of cursors to loop through data within tables. Look at the following nested loops code example.&lt;br /&gt;DECLARE&lt;br /&gt;   CURSOR dept_cur IS&lt;br /&gt;   SELECT deptno&lt;br /&gt;     FROM dept&lt;br /&gt;    ORDER BY deptno;&lt;br /&gt;&lt;br /&gt;   -- Employee cursor all employees for a dept number&lt;br /&gt;   CURSOR emp_cur (v_dept_no DEPT.DEPTNO%TYPE) IS&lt;br /&gt;   SELECT ename&lt;br /&gt;     FROM emp&lt;br /&gt;    WHERE deptno = v_dept_no;&lt;br /&gt;BEGIN&lt;br /&gt;   FOR dept_rec IN dept_cur LOOP&lt;br /&gt;      dbms_output.put_line('Employees in Department 'TO_CHAR(dept_rec.deptno));&lt;br /&gt;&lt;br /&gt;      FOR emp_rec in emp_cur(dept_rec.deptno) LOOP&lt;br /&gt;         dbms_output.put_line('...Employee is 'emp_rec.ename);&lt;br /&gt;      END LOOP;&lt;br /&gt;&lt;br /&gt;  END LOOP;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=17"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="How_often_should_one_COMMIT_in_a_PL.2FSQ"&gt;&lt;/a&gt;How often should one COMMIT in a PL/SQL loop? / What is the best commit strategy?&lt;br /&gt;Contrary to popular belief, one should COMMIT less frequently within a PL/SQL loop to prevent ORA-1555 (Snapshot too old) errors. The higher the frequency of commit, the sooner the extents in the undo/ rollback segments will be cleared for new transactions, causing ORA-1555 errors.&lt;br /&gt;To fix this problem one can easily rewrite code like this:&lt;br /&gt;FOR records IN my_cursor LOOP&lt;br /&gt;   ...do some stuff...&lt;br /&gt;   COMMIT;&lt;br /&gt;END LOOP;&lt;br /&gt;COMMIT;&lt;br /&gt;... to ...&lt;br /&gt;FOR records IN my_cursor LOOP&lt;br /&gt;   ...do some stuff...&lt;br /&gt;   i := i+1;&lt;br /&gt;   IF mod(i, 10000) = 0 THEN    -- Commit every 10000 records&lt;br /&gt;      COMMIT;&lt;br /&gt;   END IF;&lt;br /&gt;END LOOP;&lt;br /&gt;COMMIT;&lt;br /&gt;If you still get ORA-1555 errors, contact your DBA to increase the undo/ rollback segments.&lt;br /&gt;NOTE: Although fetching across COMMITs work with Oracle, is not supported by the ANSI standard.&lt;br /&gt;[&lt;a title="Edit section: I can SELECT from SQL*Plus but not from PL/SQL. What is wrong?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=18"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="I_can_SELECT_from_SQL.2APlus_but_not_fro"&gt;&lt;/a&gt;I can SELECT from SQL*Plus but not from PL/SQL. What is wrong?&lt;br /&gt;PL/SQL respect object privileges given directly to the user, but does not observe privileges given through roles. The consequence is that a SQL statement can work in SQL*Plus, but will give an error in PL/SQL. Choose one of the following solutions:&lt;br /&gt;Grant direct access on the tables to your user. Do not use roles!&lt;br /&gt;GRANT select ON scott.emp TO my_user;&lt;br /&gt;Define your procedures with invoker rights (Oracle 8i and higher);&lt;br /&gt;create or replace procedure proc1&lt;br /&gt;   authid current_user is&lt;br /&gt;begin&lt;br /&gt;...&lt;br /&gt;Move all the tables to one user/schema.&lt;br /&gt;[&lt;a title="Edit section: What is a mutating and constraining table?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=19"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="What_is_a_mutating_and_constraining_tabl"&gt;&lt;/a&gt;What is a mutating and constraining table?&lt;br /&gt;"Mutating" means "changing". A mutating table is a table that is currently being modified by an update, delete, or insert statement. When a trigger tries to reference a table that is in state of flux (being changed), it is considered "mutating" and raises an error since Oracle should not return data that has not yet reached its final state.&lt;br /&gt;Another way this error can occur is if the trigger has statements to change the primary, foreign or unique key columns of the table off which it fires. If you must have triggers on tables that have referential constraints, the workaround is to enforce the referential integrity through triggers as well.&lt;br /&gt;There are several restrictions in Oracle regarding triggers:&lt;br /&gt;A row-level trigger cannot query or modify a mutating table. (Of course, NEW and OLD still can be accessed by the trigger).&lt;br /&gt;A statement-level trigger cannot query or modify a mutating table if the trigger is fired as the result of a CASCADE delete.&lt;br /&gt;Etc.&lt;br /&gt;[&lt;a title="Edit section: Can one pass an object/table as an argument to a remote procedure?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=20"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_pass_an_object.2Ftable_as_an_arg"&gt;&lt;/a&gt;Can one pass an object/table as an argument to a remote procedure?&lt;br /&gt;The only way to reference an object type between databases is via a database link. Note that it is not enough to just use "similar" type definitions. Look at this example:&lt;br /&gt;-- Database A: receives a PL/SQL table from database B&lt;br /&gt;CREATE OR REPLACE PROCEDURE pcalled(TabX DBMS_SQL.VARCHAR2S) IS&lt;br /&gt;BEGIN&lt;br /&gt;   -- do something with TabX from database B&lt;br /&gt;   null;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;-- Database B: sends a PL/SQL table to database A&lt;br /&gt;CREATE OR REPLACE PROCEDURE pcalling IS&lt;br /&gt;   TabX DBMS_SQL.VARCHAR2S@DBLINK2;&lt;br /&gt;BEGIN&lt;br /&gt;   pcalled@DBLINK2(TabX);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;[&lt;a title="Edit section: What is the difference between stored procedures and functions?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=21"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="What_is_the_difference_between_stored_pr"&gt;&lt;/a&gt;What is the difference between stored procedures and functions?&lt;br /&gt;Functions are normally used for computations where as procedures are normally used for executing business logic.&lt;br /&gt;Functions MUST return a value, procedures doesn't need to.&lt;br /&gt;You can have DML (insert,update, delete) statements in a function. But, you cannot call such a function in a SQL query. For example, if you have a function that is updating a table, you cannot call that function from a SQL query.&lt;br /&gt;- select myFunction(field) from sometable; will throw error.&lt;br /&gt;Function returns 1 value only. Procedure can return multiple values (max 1024).&lt;br /&gt;Stored Procedure: supports deferred name resolution. Example while writing a stored procedure that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during creation but runtime throws error Function wont support deferred name resolution. Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values(SQL Server). Stored procedure is precompiled execution plan where as functions are not.&lt;br /&gt;A procedure may modify an object where a function can only return a value.&lt;br /&gt;PS: In earlier releases of Oracle it was better to put as much code as possible in procedures rather than triggers. At that stage procedures executed faster than triggers as triggers had to be re-compiled every time before executed (unless cached). In more recent releases both triggers and procedures are compiled when created (stored p-code) and one can add as much code as one likes in either procedures or triggers.&lt;br /&gt;[&lt;a title="Edit section: Is there a PL/SQL Engine in SQL*Plus?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=22"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Is_there_a_PL.2FSQL_Engine_in_SQL.2APlus"&gt;&lt;/a&gt;Is there a PL/SQL Engine in SQL*Plus?&lt;br /&gt;No. Unlike Oracle &lt;a title="Forms" href="http://www.orafaq.com/wiki/Forms"&gt;Forms&lt;/a&gt;, &lt;a title="SQL*Plus" href="http://www.orafaq.com/wiki/SQL%2APlus"&gt;SQL*Plus&lt;/a&gt; does not have an embedded PL/SQL engine. Thus, all your PL/SQL code is sent directly to the database engine for execution. This makes it much more efficient as SQL statements are not stripped off and sent to the database individually.&lt;br /&gt;[&lt;a title="Edit section: Is there a limit on the size of a PL/SQL block?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=23"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Is_there_a_limit_on_the_size_of_a_PL.2FS"&gt;&lt;/a&gt;Is there a limit on the size of a PL/SQL block?&lt;br /&gt;Yes, the max size is not an explicit byte limit, but related to the parse tree that is created when you compile the code. You can run the following select statement to query the size of an existing package or procedure:&lt;br /&gt;SQL&gt; select * from dba_object_size where name = 'procedure_name';&lt;br /&gt;[&lt;a title="Edit section: Can one COMMIT/ ROLLBACK from within a trigger?" href="http://www.orafaq.com/wiki/index.php?title=PL/SQL_FAQ&amp;amp;action=edit&amp;amp;section=24"&gt;edit&lt;/a&gt;]&lt;br /&gt;&lt;a name="Can_one_COMMIT.2F_ROLLBACK_from_within_a"&gt;&lt;/a&gt;Can one COMMIT/ ROLLBACK from within a trigger?&lt;br /&gt;Changes made within triggers should be committed or rolled back as part of the transaction in which they execute. Thus, triggers are NOT allowed to execute COMMIT or ROLLBACK statements (with the exception of autonomous triggers). Here is an example of what will happen when they do:&lt;br /&gt;SQL&gt; CREATE TABLE tab1 (col1 NUMBER);&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLE log (timestamp DATE, operation VARCHAR2(2000));&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TRIGGER tab1_trig&lt;br /&gt;  2     AFTER insert ON tab1&lt;br /&gt;  3  BEGIN&lt;br /&gt;  4     INSERT INTO log VALUES (SYSDATE, 'Insert on TAB1');&lt;br /&gt;  5     COMMIT;&lt;br /&gt;  6  END;&lt;br /&gt;  7  /&lt;br /&gt;Trigger created.&lt;br /&gt;&lt;br /&gt;SQL&gt; INSERT INTO tab1 VALUES (1);&lt;br /&gt;INSERT INTO tab1 VALUES (1)&lt;br /&gt;            *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-04092: cannot COMMIT in a trigger&lt;br /&gt;ORA-06512: at "SCOTT.TAB1_TRIG", line 3&lt;br /&gt;ORA-04088: error during execution of trigger 'SCOTT.TAB1_TRIG'&lt;br /&gt;Autonomous transactions:&lt;br /&gt;As workaround, one can use autonomous transactions. Autonomous transactions execute separate from the current transaction.&lt;br /&gt;Unlike regular triggers, autonomous triggers can contain COMMIT and ROLLBACK statements. Example:&lt;br /&gt;SQL&gt; CREATE OR REPLACE TRIGGER tab1_trig&lt;br /&gt;  2    AFTER insert ON tab1&lt;br /&gt;  3  DECLARE&lt;br /&gt;  4    PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;  5  BEGIN&lt;br /&gt;  6    INSERT INTO log VALUES (SYSDATE, 'Insert on TAB1');&lt;br /&gt;  7    COMMIT; -- only allowed in autonomous triggers&lt;br /&gt;  8  END;&lt;br /&gt;  9  /&lt;br /&gt;Trigger created.&lt;br /&gt;&lt;br /&gt;SQL&gt; INSERT INTO tab1 VALUES (1);&lt;br /&gt;1 row created.&lt;br /&gt;Note that with the above example will insert and commit log entries - even if the main transaction is rolled-back!&lt;br /&gt;&lt;br /&gt;1. Definition&lt;br /&gt;This is what the documentation says about collections:&lt;br /&gt;“A collection is an ordered group of elements, all of the same type. It is a general concept that encompasses lists, arrays, and other familiar datatypes. Each element has a unique subscript that determines its position in the collection.&lt;br /&gt;PL/SQL offers these collection types:&lt;br /&gt;·         Index-by tables, also known as associative arrays, let you look up elements using arbitrary numbers and strings for subscript values. (They are similar to hash tables in other programming languages.)&lt;br /&gt;·         Nested tables hold an arbitrary number of elements. They use sequential numbers as subscripts. You can define equivalent SQL types, allowing nested tables to be stored in database tables and manipulated through SQL.&lt;br /&gt;·         Varrays (short for variable-size arrays) hold a fixed number of elements (although you can change the number of elements at runtime). They use sequential numbers as subscripts. You can define equivalent SQL types, allowing varrays to be stored in database tables. They can be stored and retrieved through SQL, but with less flexibility than nested tables.&lt;br /&gt;Although collections can have only one dimension, you can model multi-dimensional arrays by creating collections whose elements are also collections.&lt;br /&gt;To use collections in an application, you define one or more PL/SQL types, then define variables of those types. You can define collection types in a procedure, function, or package. You can pass collection variables as parameters, to move data between client-side applications and stored subprograms.&lt;br /&gt;To look up data that is more complex than single values, you can store PL/SQL records or SQL object types in collections. Nested tables and varrays can also be attributes of object types.”&lt;br /&gt;&lt;a name="C2"&gt;&lt;/a&gt;2. Persistent and non-persistent collections&lt;br /&gt;Index-by tables cannot be stored in database tables, so they are non-persistent.&lt;br /&gt;You cannot use them in a SQL statement and are available only in PL/SQL blocks.&lt;br /&gt;Nested tables and Varrays are persistent. You can use the CREATE TYPE statement to create them in the database, you can read and write them from/to a database column.&lt;br /&gt;Nested tables and Varrays must have been initialized before you can use them.&lt;br /&gt;&lt;a name="C3"&gt;&lt;/a&gt;3. Declarations&lt;br /&gt;3.1 Nested tables&lt;br /&gt;TYPE type_name IS TABLE OF element_type [NOT NULL];&lt;br /&gt;With nested tables declared within PL/SQL, element_type can be any PL/SQL datatype except : REF CURSOR&lt;br /&gt;Nested tables declared in SQL (CREATE TYPE) have additional restrictions. They cannot use the following element types:&lt;br /&gt;q       BINARY_INTEGER, PLS_INTEGER&lt;br /&gt;q       BOOLEAN&lt;br /&gt;q       LONG, LONG RAW&lt;br /&gt;q       NATURAL, NATURALN&lt;br /&gt;q       POSITIVE, POSITIVEN&lt;br /&gt;q       REF CURSOR&lt;br /&gt;q       SIGNTYPE&lt;br /&gt;q       STRING&lt;br /&gt;PL/SQL&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_NT_NUM IS TABLE OF NUMBER ;&lt;br /&gt;SQL&lt;br /&gt;   CREATE [OR REPLACE] TYPE TYP_NT_NUM IS TABLE OF NUMBER ;&lt;br /&gt;3.2 Varrays&lt;br /&gt;TYPE type_name IS {VARRAY  VARYING ARRAY} (size_limit)&lt;br /&gt;   OF element_type [NOT NULL];&lt;br /&gt;size_limit is a positive integer literal representing the maximum number of elements in the array.&lt;br /&gt;PL/SQL&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_V_CHAR IS VARRAY(10) OF VARCHAR2(20) ;&lt;br /&gt;SQL&lt;br /&gt;   CREATE [OR REPLACE] TYPE TYP_V_CHAR IS VARRAY(10) OF VARCHAR2(20) ;&lt;br /&gt;3.3 Index-by tables&lt;br /&gt;TYPE type_name IS TABLE OF element_type [NOT NULL]&lt;br /&gt;   INDEX BY [BINARY_INTEGER  PLS_INTEGER  VARCHAR2(size_limit)];&lt;br /&gt;INDEX BY key_type;&lt;br /&gt;The key_type can be numeric, either BINARY_INTEGER or PLS_INTEGER(9i).&lt;br /&gt;It can also be VARCHAR2 or one of its subtypes VARCHAR, STRING, or LONG. You must specify the length of a VARCHAR2-based key, except for LONG which is equivalent to declaring a key type of VARCHAR2(32760).&lt;br /&gt;The types RAW, LONG RAW, ROWID, CHAR, and CHARACTER are not allowed as keys for an associative array.&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_TAB_VAR IS TABLE OF VARCHAR2(50) INDEX BY BINARY_INTEGER ;&lt;br /&gt;&lt;a name="C4"&gt;&lt;/a&gt;4. Initalization&lt;br /&gt;Only Nested tables and varrays need initialization.&lt;br /&gt;To initialize a collection, you use the “constructor” of the collection which name is the same as the collection.&lt;br /&gt;4.1 Nested tables&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_NT_NUM IS TABLE OF NUMBER ;&lt;br /&gt;    Nt_tab TYP_NT_NUM ;&lt;br /&gt;Begin&lt;br /&gt;   Nt_tab := TYP_NT_NUM( 5, 10, 15, 20 ) ;&lt;br /&gt;End ;&lt;br /&gt;4.2 Varrays&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_V_DAY IS VARRAY(7) OF VARCHAR2(15) ;&lt;br /&gt;   v_tab TYP_V_DAY ;&lt;br /&gt;Begin&lt;br /&gt;   v_tab := TYP_NT_NUM( ‘Sunday’,’Monday’,’Tuesday’,’Wedneday’,’Thursday’,’Friday’,’Saturday’ ) ;&lt;br /&gt;End ;&lt;br /&gt;It is not required to initialize all the elements of a collection. You can either initialize no element. In this case, use an empty constructor.&lt;br /&gt;v_tab := TYP_NT_NUM() ;&lt;br /&gt;This collection is empty, which is different than a NULL collection (not initialized).&lt;br /&gt;4.3 Index-by tables&lt;br /&gt;Declare&lt;br /&gt;   TYPE TYP_TAB IS TABLE OF NUMBER INDEX BY PLS_INTEGER ;&lt;br /&gt;   my_tab  TYP_TAB ;&lt;br /&gt;Begin&lt;br /&gt;   my_tab(1) := 5 ;&lt;br /&gt;   my_tab(2) := 10 ;&lt;br /&gt;   my_tab(3) := 15 ;&lt;br /&gt;End ;&lt;br /&gt;&lt;a name="C5"&gt;&lt;/a&gt;5. Handle the collection&lt;br /&gt;While the collection is not initialized (Nested tables and Varrays), it is not possible to manipulate it.&lt;br /&gt;You can test if a collection is initialized:&lt;br /&gt;Declare&lt;br /&gt;  TYPE TYP_VAR_TAB is VARRAY(30) of varchar2(100) ;&lt;br /&gt;  tab1 TYP_VAR_TAB ; -- declared but not initialized&lt;br /&gt;Begin&lt;br /&gt;  If Tab1 IS NULL Then&lt;br /&gt;        -- NULL collection, have to initialize it --&lt;br /&gt;       Tab1 := TYP_VAR_TAB('','','','','','','','','','');&lt;br /&gt;  End if ;&lt;br /&gt;  -- Now, we can handle the collection --&lt;br /&gt;End ;&lt;br /&gt;To access an element of a collection, we need to use a subscript value that indicates the unique element of the collection.&lt;br /&gt;The subscript is of type integer or varchar2.&lt;br /&gt;Declare&lt;br /&gt;   Type    TYPE_TAB_EMP IS TABLE OF Varchar2(60) INDEX BY BINARY_INTEGER ;&lt;br /&gt;   emp_tab TYPE_TAB_EMP ;&lt;br /&gt;   i       pls_integer ;&lt;br /&gt;Begin&lt;br /&gt;   For i in 0..10 Loop&lt;br /&gt;     emp_tab( i+1 ) := 'Emp '  ltrim( to_char( i ) ) ;&lt;br /&gt;   End loop ;&lt;br /&gt;End ;&lt;br /&gt;Declare&lt;br /&gt;  Type    TYPE_TAB_DAYS IS TABLE OF PLS_INTEGER INDEX BY VARCHAR2(20) ;&lt;br /&gt;  day_tab TYPE_TAB_DAYS ;&lt;br /&gt;Begin&lt;br /&gt;   day_tab( 'Monday' )    := 10 ;&lt;br /&gt;   day_tab( 'Tuesday' )   := 20 ;&lt;br /&gt;   day_tab( 'Wednesday' ) := 30 ;&lt;br /&gt;End ;&lt;br /&gt;It is possible to assign values of a collection to another collection if they are of the same type.&lt;br /&gt;Declare&lt;br /&gt;  Type TYPE_TAB_EMP  IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER ;&lt;br /&gt;  Type TYPE_TAB_EMP2 IS TABLE OF EMP%ROWTYPE INDEX BY BINARY_INTEGER ; &lt;br /&gt;  tab1 TYPE_TAB_EMP  := TYPE_TAB_EMP( ... );&lt;br /&gt;  tab2 TYPE_TAB_EMP  := TYPE_TAB_EMP( ... );&lt;br /&gt;  tab3 TYPE_TAB_EMP2 := TYPE_TAB_EMP2( ... ); &lt;br /&gt;Begin&lt;br /&gt;    tab2 := tab1 ; -- OK&lt;br /&gt;    tab3 := tab1 ; -- Error : types not similar&lt;br /&gt;    ...           &lt;br /&gt;End ;&lt;br /&gt;Comparing collections&lt;br /&gt;Until the 10g release, collections cannot be directly compared for equality or inequality.&lt;br /&gt;The 10g release allows to do some comparaisons between collections:&lt;br /&gt;You can compare collections of same type to verify if they ar equals or not equals&lt;br /&gt;DECLARE&lt;br /&gt;   TYPE      Colors IS TABLE OF VARCHAR2(64);&lt;br /&gt;   primaries     Colors := Colors('Blue','Green','Red');&lt;br /&gt;   rgb           Colors := Colors('Red','Green','Blue');&lt;br /&gt;   traffic_light Colors := Colors('Red','Green','Amber');&lt;br /&gt;BEGIN&lt;br /&gt;    -- We can use = or !=, but not &lt;&gt;.&lt;br /&gt;    -- 2 collections are equal even if the membersare not in the same order.&lt;br /&gt;   IF primaries = rgb THEN&lt;br /&gt;      dbms_output.put_line('OK, PRIMARIES &amp;amp; RGB have same members.');&lt;br /&gt;   END IF;&lt;br /&gt;   IF rgb != traffic_light THEN&lt;br /&gt;      dbms_output.put_line('RGB &amp;amp; TRAFFIC_LIGHT have different members');&lt;br /&gt;   END IF;&lt;br /&gt;END;&lt;br /&gt;You can also apply some operators on the collections:&lt;br /&gt;DECLARE&lt;br /&gt;  TYPE nested_typ IS TABLE OF NUMBER;&lt;br /&gt;  nt1 nested_typ := nested_typ(1,2,3);&lt;br /&gt;  nt2 nested_typ := nested_typ(3,2,1);&lt;br /&gt;  nt3 nested_typ := nested_typ(2,3,1,3);&lt;br /&gt;  nt4 nested_typ := nested_typ(1,2,4);&lt;br /&gt;  reponse BOOLEAN;&lt;br /&gt;  combien NUMBER;&lt;br /&gt;  PROCEDURE verif(test BOOLEAN DEFAULT NULL, label IN VARCHAR2 DEFAULT NULL, quantity NUMBER DEFAULT NULL) IS&lt;br /&gt;  BEGIN&lt;br /&gt;     IF test IS NOT NULL THEN&lt;br /&gt;        dbms_output.put_line(label  ' -&gt; '  CASE test WHEN TRUE THEN 'True' WHEN FALSE THEN 'False' END);&lt;br /&gt;     END IF;&lt;br /&gt;     IF quantity IS NOT NULL THEN&lt;br /&gt;        dbms_output.put_line(quantity);&lt;br /&gt;     END IF;&lt;br /&gt;  END;&lt;br /&gt;BEGIN&lt;br /&gt;  reponse := nt1 IN (nt2,nt3,nt4); -- true, nt1 correspond to nt2&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt1 IN (nt2,nt3,nt4)');&lt;br /&gt;  reponse := nt1 SUBMULTISET OF nt3; -- true, all elements correpond&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt1 SUBMULTISET OF nt3');&lt;br /&gt;  reponse := nt1 NOT SUBMULTISET OF nt4; -- true&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt1 NOT SUBMULTISET OF nt4');&lt;br /&gt;  combien := CARDINALITY(nt3); -- number of elements of nt3&lt;br /&gt;  verif(quantity =&gt; combien);&lt;br /&gt;  combien := CARDINALITY(SET(nt3)); -- number of distinct elements&lt;br /&gt;  verif(quantity =&gt; combien);&lt;br /&gt;  reponse := 4 MEMBER OF nt1; -- false, no corresponding element&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; '4 MEMBER OF nt1');&lt;br /&gt;  reponse := nt3 IS A SET; -- false, nt3 have duplicated elements&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt3 IS A SET' );&lt;br /&gt;  reponse := nt3 IS NOT A SET; -- true, nt3 have diplicated elements&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt3 IS NOT A SET' );&lt;br /&gt;  reponse := nt1 IS EMPTY; -- false, nt1 have elements&lt;br /&gt;  verif(test =&gt; reponse, label =&gt; 'nt1 IS EMPTY' );&lt;br /&gt;END;&lt;br /&gt;nt1 IN (nt2,nt3,nt4) -&gt; True&lt;br /&gt;nt1 SUBMULTISET OF nt3 -&gt; True&lt;br /&gt;nt1 NOT SUBMULTISET OF nt4 -&gt; True&lt;br /&gt;4&lt;br /&gt;3&lt;br /&gt;4 MEMBER OF nt1 -&gt; False&lt;br /&gt;nt3 IS A SET -&gt; False&lt;br /&gt;nt3 IS NOT A SET -&gt; True&lt;br /&gt;nt1 IS EMPTY -&gt; False&lt;br /&gt;&lt;br /&gt;&lt;a name="C6"&gt;&lt;/a&gt;6. Methods&lt;br /&gt;We can use the following methods on a collection:&lt;br /&gt;·         EXISTS&lt;br /&gt;·         COUNT&lt;br /&gt;·         LIMIT&lt;br /&gt;·         FIRST and LAST&lt;br /&gt;·         PRIOR and NEXT&lt;br /&gt;·         EXTEND&lt;br /&gt;·         TRIM&lt;br /&gt;·         DELETE&lt;br /&gt;A collection method is a built-in function or procedure that operates on collections and is called using dot notation.&lt;br /&gt;collection_name.method_name[(parameters)]&lt;br /&gt;Collection methods cannot be called from SQL statements.&lt;br /&gt;Only the EXISTS method can be used on a NULL collection.all other methods applied on a null collection raise the COLLECTION_IS_NULL error.&lt;br /&gt;6.1  EXISTS(index) Returns TRUE if the index element exists in the collection, else it returns FALSE. Use this method to be sure you are doing a valid operation on the collection.&lt;br /&gt;This method does not raise the SUBSCRIPT_OUTSIDE_LIMIT exception if used on an element that does not exists in the collection.&lt;br /&gt;If my_collection.EXISTS(10) Then&lt;br /&gt;   My_collection.DELETE(10) ;&lt;br /&gt;End if ;&lt;br /&gt;6.2  COUNT&lt;br /&gt;Returns the number of elements in a collection.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF NUMBER;&lt;br /&gt;  3     my_tab  TYP_TAB := TYP_TAB( 1, 2, 3, 4, 5 );&lt;br /&gt;  4  Begin  &lt;br /&gt;  5     Dbms_output.Put_line( 'COUNT = '  To_Char( my_tab.COUNT ) ) ;&lt;br /&gt;  6     my_tab.DELETE(2) ;&lt;br /&gt;  7     Dbms_output.Put_line( 'COUNT = '  To_Char( my_tab.COUNT ) ) ;&lt;br /&gt;  8  End ;     &lt;br /&gt;  9  /&lt;br /&gt;COUNT = 5&lt;br /&gt;COUNT = 4&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;6.3  LIMIT&lt;br /&gt;Returns the maximum number of elements that a varray can contain.&lt;br /&gt;Return NULL for Nested tables and Index-by tables&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_ARRAY IS ARRAY(30) OF NUMBER ;&lt;br /&gt;  3    my_array  TYP_ARRAY := TYP_ARRAY( 1, 2, 3 ) ;&lt;br /&gt;  4  Begin&lt;br /&gt;  5    dbms_output.put_line( 'Max array size is '  my_array.LIMIT ) ;&lt;br /&gt;  6  End;&lt;br /&gt;  7  /&lt;br /&gt;Max array size is 30&lt;br /&gt;6.4  FIRST and LAST&lt;br /&gt;Returns the first or last subscript of a collection.&lt;br /&gt;If the collection is empty, FIRST and LAST return NULL&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF NUMBER;&lt;br /&gt;  3     my_tab  TYP_TAB := TYP_TAB( 1, 2, 3, 4, 5 );&lt;br /&gt;  4  Begin  &lt;br /&gt;  5     For i IN my_tab.FIRST .. my_tab.LAST Loop&lt;br /&gt;  6        Dbms_output.Put_line( 'my_tab('  Ltrim(To_Char(i))  ') = '  To_Char( my_tab(i) ) ) ;&lt;br /&gt;  7     End loop ;&lt;br /&gt;  8  End ;&lt;br /&gt;  9 &lt;br /&gt; 10  /&lt;br /&gt;my_tab(1) = 1&lt;br /&gt;my_tab(2) = 2&lt;br /&gt;my_tab(3) = 3&lt;br /&gt;my_tab(4) = 4&lt;br /&gt;my_tab(5) = 5&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF PLS_INTEGER INDEX BY VARCHAR2(1);&lt;br /&gt;  3     my_tab  TYP_TAB;&lt;br /&gt;  4  Begin  &lt;br /&gt;  5     For i in 65 .. 69 Loop&lt;br /&gt;  6        my_tab( Chr(i) ) := i ;&lt;br /&gt;  7     End loop ;&lt;br /&gt;  8     Dbms_Output.Put_Line( 'First= '  my_tab.FIRST  '  Last= '  my_tab.LAST ) ;&lt;br /&gt;  9  End ;&lt;br /&gt; 10  /&lt;br /&gt;First= A  Last= E&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;6.5  PRIOR(index) and NEXT(index)&lt;br /&gt;Returns the previous or next subscript of the index element.&lt;br /&gt;If the index element has no predecessor, PRIOR(index) returns NULL. Likewise, if index has no successor, NEXT(index) returns NULL.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF PLS_INTEGER INDEX BY VARCHAR2(1) ;&lt;br /&gt;  3     my_tab  TYP_TAB ;&lt;br /&gt;  4     c       Varchar2(1) ;&lt;br /&gt;  5  Begin  &lt;br /&gt;  6     For i in 65 .. 69 Loop&lt;br /&gt;  7        my_tab( Chr(i) ) := i ;&lt;br /&gt;  8     End loop ;&lt;br /&gt;  9     c := my_tab.FIRST ; -- first element&lt;br /&gt; 10     Loop&lt;br /&gt; 11        Dbms_Output.Put_Line( 'my_tab('  c  ') = '  my_tab(c) ) ;&lt;br /&gt; 12        c := my_tab.NEXT(c) ; -- get the successor element&lt;br /&gt; 13        Exit When c IS NULL ; -- end of collection&lt;br /&gt; 14     End loop ;&lt;br /&gt; 15  End ;&lt;br /&gt; 16  /&lt;br /&gt;my_tab(A) = 65&lt;br /&gt;my_tab(B) = 66&lt;br /&gt;my_tab(C) = 67&lt;br /&gt;my_tab(D) = 68&lt;br /&gt;my_tab(E) = 69&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Use the PRIOR() or NEXT() method to be sure that you do not access an invalid element:&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF PLS_INTEGER ;&lt;br /&gt;  3     my_tab  TYP_TAB := TYP_TAB( 1, 2, 3, 4, 5 );&lt;br /&gt;  4  Begin  &lt;br /&gt;  5     my_tab.DELETE(2) ; -- delete an element of the collection&lt;br /&gt;  6     For i in my_tab.FIRST .. my_tab.LAST Loop&lt;br /&gt;  7        Dbms_Output.Put_Line( 'my_tab('  Ltrim(To_char(i))  ') = '  my_tab(i) ) ;&lt;br /&gt;  8     End loop ;&lt;br /&gt;  9  End ;&lt;br /&gt; 10  /&lt;br /&gt;my_tab(1) = 1&lt;br /&gt;Declare&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01403: no data found&lt;br /&gt;ORA-06512: at line 7&lt;br /&gt;In this example, we get an error because one element of the collection was deleted.&lt;br /&gt;One solution is to use the PRIOR()/NEXT() method:&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF PLS_INTEGER ;&lt;br /&gt;  3     my_tab  TYP_TAB := TYP_TAB( 1, 2, 3, 4, 5 );&lt;br /&gt;  4     v       Pls_Integer ;&lt;br /&gt;  5  Begin  &lt;br /&gt;  6     my_tab.DELETE(2) ;&lt;br /&gt;  7     v := my_tab.first ;&lt;br /&gt;  8     Loop&lt;br /&gt;  9        Dbms_Output.Put_Line( 'my_tab('  Ltrim(To_char(v))  ') = '  my_tab(v) ) ;&lt;br /&gt; 10        v := my_tab.NEXT(v) ; -- get the next valid subscript&lt;br /&gt; 11        Exit When v IS NULL ;&lt;br /&gt; 12     End loop ;&lt;br /&gt; 13  End ;&lt;br /&gt; 14  /&lt;br /&gt;my_tab(1) = 1&lt;br /&gt;my_tab(3) = 3&lt;br /&gt;my_tab(4) = 4&lt;br /&gt;my_tab(5) = 5&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Another solution is to test if the index exists before use it:&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB IS TABLE OF PLS_INTEGER ;&lt;br /&gt;  3     my_tab  TYP_TAB := TYP_TAB( 1, 2, 3, 4, 5 );&lt;br /&gt;  4  Begin  &lt;br /&gt;  5     my_tab.DELETE(2) ;&lt;br /&gt;  6     For i IN my_tab.FIRST .. my_tab.LAST Loop&lt;br /&gt;  7        If my_tab.EXISTS(i) Then&lt;br /&gt;  8           Dbms_Output.Put_Line( 'my_tab('  Ltrim(To_char(i))  ') = '  my_tab(i) ) ;&lt;br /&gt;  9        End if ;&lt;br /&gt; 10     End loop ;&lt;br /&gt; 11  End ;&lt;br /&gt; 12  /&lt;br /&gt;my_tab(1) = 1&lt;br /&gt;my_tab(3) = 3&lt;br /&gt;my_tab(4) = 4&lt;br /&gt;my_tab(5) = 5&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;6.6  EXTEND[(n[,i])]&lt;br /&gt;Used to extend a collection (add new elements)&lt;br /&gt;·         EXTEND appends one null element to a collection.&lt;br /&gt;·         EXTEND(n) appends n null elements to a collection.&lt;br /&gt;·         EXTEND(n,i) appends n copies of the ith element to a collection.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE TYP_NES_TAB is table of Varchar2(20) ;&lt;br /&gt;  3     tab1 TYP_NES_TAB ;&lt;br /&gt;  4     i    Pls_Integer ;&lt;br /&gt;  5     Procedure Print( i in Pls_Integer ) IS&lt;br /&gt;  6     BEGIN Dbms_Output.Put_Line( 'tab1('  ltrim(to_char(i)) ') = '  tab1(i) ) ; END ;&lt;br /&gt;  7     Procedure PrintAll IS&lt;br /&gt;  8     Begin&lt;br /&gt;  9       Dbms_Output.Put_Line( '* Print all collection *' ) ;&lt;br /&gt; 10    For i IN tab1.FIRST..tab1.LAST Loop&lt;br /&gt; 11          If tab1.EXISTS(i) Then&lt;br /&gt; 12          Dbms_Output.Put_Line( 'tab1('  ltrim(to_char(i)) ') = '  tab1(i) ) ;&lt;br /&gt; 13    End if ;&lt;br /&gt; 14    End loop ;&lt;br /&gt; 15     End ;  &lt;br /&gt; 16  Begin&lt;br /&gt; 17     tab1 := TYP_NES_TAB('One') ;&lt;br /&gt; 18     i := tab1.COUNT ;&lt;br /&gt; 19     Dbms_Output.Put_Line( 'tab1.COUNT = '  i ) ;&lt;br /&gt; 20     Print(i) ;&lt;br /&gt; 21     -- the following line raise an error because the second index does not exists in the collection --&lt;br /&gt; 22     -- tab1(2) := 'Two' ;&lt;br /&gt; 23     -- Add one empty element --&lt;br /&gt; 24     tab1.EXTEND ;&lt;br /&gt; 25     i := tab1.COUNT ;&lt;br /&gt; 26     tab1(i) := 'Two' ; Printall ;&lt;br /&gt; 27     -- Add two empty elements --&lt;br /&gt; 28     tab1.EXTEND(2) ;&lt;br /&gt; 29     i := i + 1 ;&lt;br /&gt; 30     tab1(i) := 'Three' ;&lt;br /&gt; 31     i := i + 1 ;&lt;br /&gt; 32     tab1(i) := 'Four' ; Printall ;  &lt;br /&gt; 33     -- Add three elements with the same value as element 4 --&lt;br /&gt; 34     tab1.EXTEND(3,1) ;&lt;br /&gt; 35     i := i + 3 ; Printall ;&lt;br /&gt; 36  End;&lt;br /&gt;/&lt;br /&gt;tab1.COUNT = 1&lt;br /&gt;tab1(1) = One&lt;br /&gt;* Print all collection *&lt;br /&gt;tab1(1) = One&lt;br /&gt;tab1(2) = Two&lt;br /&gt;* Print all collection *&lt;br /&gt;tab1(1) = One&lt;br /&gt;tab1(2) = Two&lt;br /&gt;tab1(3) = Three&lt;br /&gt;tab1(4) = Four&lt;br /&gt;* Print all collection *&lt;br /&gt;tab1(1) = One&lt;br /&gt;tab1(2) = Two&lt;br /&gt;tab1(3) = Three&lt;br /&gt;tab1(4) = Four&lt;br /&gt;tab1(5) = One&lt;br /&gt;tab1(6) = One&lt;br /&gt;tab1(7) = One&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;6.7  TRIM[(n)]&lt;br /&gt;Used to decrease the size of a collection&lt;br /&gt;·         TRIM removes one element from the end of a collection.&lt;br /&gt;·         TRIM(n) removes n elements from the end of a collection.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE TYP_TAB is table of varchar2(100) ;&lt;br /&gt;  3     tab  TYP_TAB ;&lt;br /&gt;  4  Begin&lt;br /&gt;  5     tab := TYP_TAB( 'One','Two','Three' ) ;&lt;br /&gt;  6     For i in tab.first..tab.last Loop&lt;br /&gt;  7       dbms_output.put_line( 'tab('  ltrim( to_char( i ) )  ') = '  tab(i) ) ;&lt;br /&gt;  8     End loop ;&lt;br /&gt;  9     -- add 3 element with second element value --&lt;br /&gt; 10     dbms_output.put_line( '* add 3 elements *' ) ;&lt;br /&gt; 11     tab.EXTEND(3,2) ;&lt;br /&gt; 12     For i in tab.first..tab.last Loop&lt;br /&gt; 13       dbms_output.put_line( 'tab('  ltrim( to_char( i ) )  ') = '  tab(i) ) ;&lt;br /&gt; 14     End loop ;&lt;br /&gt; 15     -- suppress the last element --&lt;br /&gt; 16     dbms_output.put_line( '* suppress the last element *' ) ;&lt;br /&gt; 17     tab.TRIM ;&lt;br /&gt; 18     For i in tab.first..tab.last Loop&lt;br /&gt; 19       dbms_output.put_line( 'tab('  ltrim( to_char( i ) )  ') = '  tab(i) ) ;&lt;br /&gt; 20     End loop ;&lt;br /&gt; 21  End;&lt;br /&gt; 22  /&lt;br /&gt;tab(1) = One&lt;br /&gt;tab(2) = Two&lt;br /&gt;tab(3) = Three&lt;br /&gt;* add 3 elements *&lt;br /&gt;tab(1) = One&lt;br /&gt;tab(2) = Two&lt;br /&gt;tab(3) = Three&lt;br /&gt;tab(4) = Two&lt;br /&gt;tab(5) = Two&lt;br /&gt;tab(6) = Two&lt;br /&gt;* suppress the last element *&lt;br /&gt;tab(1) = One&lt;br /&gt;tab(2) = Two&lt;br /&gt;tab(3) = Three&lt;br /&gt;tab(4) = Two&lt;br /&gt;tab(5) = Two&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;If you try to suppress more elements than the collection contents, you get a SUBSCRIPT_BEYOND_COUNT exception.&lt;br /&gt;6.8  DELETE[(n[,m])]&lt;br /&gt;·         DELETE removes all elements from a collection.&lt;br /&gt;·         DELETE(n) removes the nth element from an associative array with a numeric key or a nested table. If the associative array has a string key, the element corresponding to the key value is deleted. If n is null, DELETE(n) does nothing.&lt;br /&gt;·         DELETE(n,m) removes all elements in the range m..n from an associative array or nested table. If m is larger than n or if m or n is null, DELETE(n,m) does nothing&lt;br /&gt;Caution :&lt;br /&gt;LAST returns the greatest subscript of a collection and COUNT returns the number of elements of a collection.&lt;br /&gt;If you delete some elements, LAST != COUNT.&lt;br /&gt;Suppression of all the elements&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_TAB is table of varchar2(100) ;&lt;br /&gt;  3    tab  TYP_TAB ;&lt;br /&gt;  4  Begin&lt;br /&gt;  5    tab := TYP_TAB( 'One','Two','Three' ) ;&lt;br /&gt;  6    dbms_output.put_line( 'Suppression of all elements' ) ;&lt;br /&gt;  7    tab.DELETE ;&lt;br /&gt;  8    dbms_output.put_line( 'tab.COUNT = '  tab.COUNT) ; &lt;br /&gt;  9  End;&lt;br /&gt; 10  /&lt;br /&gt;Suppression of all elements&lt;br /&gt;tab.COUNT = 0&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Suppression of the second element&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_TAB is table of varchar2(100) ;&lt;br /&gt;  3    tab  TYP_TAB ;&lt;br /&gt;  4  Begin&lt;br /&gt;  5    tab := TYP_TAB( 'One','Two','Three' ) ;&lt;br /&gt;  6    dbms_output.put_line( 'Suppression of the 2nd element' ) ;&lt;br /&gt;  7    tab.DELETE(2) ;&lt;br /&gt;  8    dbms_output.put_line( 'tab.COUNT = '  tab.COUNT) ;&lt;br /&gt;  9    dbms_output.put_line( 'tab.LAST  = '  tab.LAST) ;&lt;br /&gt; 10    For i IN tab.FIRST .. tab.LAST Loop&lt;br /&gt; 11      If tab.EXISTS(i) Then&lt;br /&gt; 12         dbms_output.put_line( tab(i) ) ;&lt;br /&gt; 13      End if ;&lt;br /&gt; 14    End loop ; &lt;br /&gt; 15  End;&lt;br /&gt; 16  /&lt;br /&gt;Suppression of the 2nd element&lt;br /&gt;tab.COUNT = 2&lt;br /&gt;tab.LAST  = 3&lt;br /&gt;One&lt;br /&gt;Three&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Caution:&lt;br /&gt;For Varrays, you can suppress only the last element.&lt;br /&gt;If the element does not exists, no exception is raised.&lt;br /&gt;6.9 Main collection exceptions&lt;br /&gt;DECLARE&lt;br /&gt;   TYPE NumList IS TABLE OF NUMBER;&lt;br /&gt;   nums NumList;  -- atomically null&lt;br /&gt;BEGIN&lt;br /&gt;   /* Assume execution continues despite the raised exceptions. */&lt;br /&gt;   nums(1) := 1;            -- raises COLLECTION_IS_NULL       (1)&lt;br /&gt;   nums := NumList(1,2);    -- initialize table&lt;br /&gt;   nums(NULL) := 3          -- raises VALUE_ERROR              (2)&lt;br /&gt;   nums(0) := 3;            -- raises SUBSCRIPT_OUTSIDE_LIMIT  (3)&lt;br /&gt;   nums(3) := 3;            -- raises SUBSCRIPT_BEYOND_COUNT   (4)&lt;br /&gt;   nums.DELETE(1);          -- delete element 1&lt;br /&gt;   IF nums(1) = 1 THEN ...  -- raises NO_DATA_FOUND            (5)&lt;br /&gt;&lt;a name="C7"&gt;&lt;/a&gt;7. Multi-level Collections&lt;br /&gt;A collection is a one-dimension table.&lt;br /&gt;You can have multi-dimension tables by creating collection of collection.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_TAB is table of NUMBER index by PLS_INTEGER ;&lt;br /&gt;  3    TYPE TYP_TAB_TAB is table of TYP_TAB index by PLS_INTEGER ;&lt;br /&gt;  4    tab1 TYP_TAB_TAB ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6    For i IN 1 .. 3 Loop&lt;br /&gt;  7       For j IN 1 .. 2 Loop&lt;br /&gt;  8         tab1(i)(j) := i + j ;&lt;br /&gt;  9         dbms_output.put_line( 'tab1('    ltrim(to_char(i))&lt;br /&gt; 10                                ')('    ltrim(to_char(j))&lt;br /&gt; 11                                ') = '  tab1(i)(j) ) ;         &lt;br /&gt; 12       End loop ;&lt;br /&gt; 13    End loop ; &lt;br /&gt; 14  End;&lt;br /&gt; 15  /&lt;br /&gt;tab1(1)(1) = 2&lt;br /&gt;tab1(1)(2) = 3&lt;br /&gt;tab1(2)(1) = 3&lt;br /&gt;tab1(2)(2) = 4&lt;br /&gt;tab1(3)(1) = 4&lt;br /&gt;tab1(3)(2) = 5&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Collections of records&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_TAB is table of DEPT%ROWTYPE index by PLS_INTEGER ;&lt;br /&gt;  3    tb_dept TYP_TAB ;&lt;br /&gt;  4    rec     DEPT%ROWTYPE ;&lt;br /&gt;  5    Cursor  CDEPT IS Select * From DEPT ;&lt;br /&gt;  6  Begin&lt;br /&gt;  7    Open CDEPT ;&lt;br /&gt;  8    Loop&lt;br /&gt;  9       Fetch CDEPT Into rec ;&lt;br /&gt; 10       Exit  When CDEPT%NOTFOUND ;&lt;br /&gt; 11       tb_dept(CDEPT%ROWCOUNT) := rec ;&lt;br /&gt; 12    End loop ;&lt;br /&gt; 13    For i IN tb_dept.FIRST .. tb_dept.LAST Loop&lt;br /&gt; 14      dbms_output.put_line( tb_dept(i).DNAME  ' - ' tb_dept(i).LOC ) ;&lt;br /&gt; 15    End loop ; &lt;br /&gt; 16  End;&lt;br /&gt; 17  /&lt;br /&gt;ACCOUNTING - NEW YORK&lt;br /&gt;RESEARCH - DALLAS&lt;br /&gt;SALES - CHICAGO&lt;br /&gt;OPERATIONS - BOSTON&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;a name="C8"&gt;&lt;/a&gt;8. Collections and database tables&lt;br /&gt;Nested tables and Varrays can be stored in a database column of relational or object table.&lt;br /&gt;To manipulate collection from SQL, you have to create the types in the database with the CREATE TYPE statement.&lt;br /&gt;Nested tables&lt;br /&gt;CREATE [OR REPLACE] TYPE [schema. .] type_name&lt;br /&gt;{ IS  AS } TABLE OF datatype;&lt;br /&gt;Varrays&lt;br /&gt;CREATE [OR REPLACE] TYPE [schema. .] type_name&lt;br /&gt;{ IS  AS } { VARRAY  VARYING ARRAY } ( limit ) OF datatype;&lt;br /&gt;One or several collections can be stored in a database column.&lt;br /&gt;Let’s see an example with a relational table.&lt;br /&gt;You want to make a table that store the invoices and the currents invoice lines of the company.&lt;br /&gt;You need to define the invoice line type as following:&lt;br /&gt;-- type of invoice line --&lt;br /&gt;CREATE TYPE TYP_LIG_ENV AS OBJECT (&lt;br /&gt;  lig_num    Integer,&lt;br /&gt;  lig_code   Varchar2(20),&lt;br /&gt;  lig_Pht    Number(6,2),&lt;br /&gt;  lig_Tva    Number(3,1),&lt;br /&gt;  ligQty     Integer&lt;br /&gt;);&lt;br /&gt;-- nested table of invoice lines --&lt;br /&gt;CREATE TYPE TYP_TAB_LIG_ENV AS TABLE OF TYP_LIG_ENV ;&lt;br /&gt;Then create the invoice table as following:&lt;br /&gt;-- table of invoices --&lt;br /&gt;CREATE TABLE INVOICE (&lt;br /&gt;  inv_num     Number(9),&lt;br /&gt;  inv_numcli  Number(6),&lt;br /&gt;  inv_date    Date,&lt;br /&gt;  inv_line    TYP_TAB_LIG_ENV ) –- lines collection&lt;br /&gt;  NESTED TABLE inv_line STORE AS inv_line_table ;&lt;br /&gt;You can query the USER_TYPES view to get information on the types created in the database.&lt;br /&gt;-- show all types --&lt;br /&gt;SQL&gt; select type_name, typecode, attributes from user_types&lt;br /&gt;  2  /&lt;br /&gt;TYPE_NAME                      TYPECODE                       ATTRIBUTES&lt;br /&gt;------------------------------ ------------------------------ ----------&lt;br /&gt;TYP_LIG_ENV                    OBJECT                                  5&lt;br /&gt;TYP_TAB_LIG_ENV                COLLECTION                              0&lt;br /&gt;SQL&gt;&lt;br /&gt;You can query the USER_COLL_TYPES view to get information on the collections created in the database.&lt;br /&gt;-- show collections --&lt;br /&gt;SQL&gt; select type_name, coll_type, elem_type_owner, elem_type_name from user_coll_types&lt;br /&gt;  2  /&lt;br /&gt;TYPE_NAME                 COLL_TYPE              ELEM_TYPE_OWNER           ELEM_TYPE_NAME&lt;br /&gt;------------------------- ---------------------- ------------------------- -------&lt;br /&gt;TYP_TAB_LIG_ENV           TABLE                  TEST                      TYP_LIG_ENV&lt;br /&gt;You can query the USER_TYPE_ATTRS view to get information on the collection attributes.&lt;br /&gt;-- show collection attributes --&lt;br /&gt;SQL&gt; select type_name, attr_name, attr_type_name, length, precision, scale, attr_no&lt;br /&gt;  2  from user_type_attrs&lt;br /&gt;  3  /&lt;br /&gt;TYPE_NAME       ATTR_NAME       ATTR_TYPE_     LENGTH  PRECISION      SCALE    ATTR_NO&lt;br /&gt;--------------- --------------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;TYP_LIG_ENV     LIG_NUM         INTEGER                                              1&lt;br /&gt;TYP_LIG_ENV     LIG_CODE        VARCHAR2           20                                2&lt;br /&gt;TYP_LIG_ENV     LIG_PHT         NUMBER                         6          2          3&lt;br /&gt;TYP_LIG_ENV     LIG_TVA         NUMBER                         3          1          4&lt;br /&gt;TYP_LIG_ENV     LIGQTY          INTEGER                                              5&lt;br /&gt;Constraints on the collection attributes&lt;br /&gt;You can enforce constraints on each attribute of a collection&lt;br /&gt;-- constraints on collection attributes --&lt;br /&gt;alter table inv_line_table&lt;br /&gt;add constraint lignum_notnull CHECK( lig_num IS NOT NULL ) ;&lt;br /&gt;alter table inv_line_table&lt;br /&gt;add constraint ligcode_unique UNIQUE( lig_code ) ;&lt;br /&gt;alter table inv_line_table&lt;br /&gt;add constraint ligtva_check CHECK( lig_tva IN( 5.0,19.6 ) ) ;&lt;br /&gt;Constraints on the whole collection&lt;br /&gt;-- constraints on the whole collection --&lt;br /&gt;alter table invoice&lt;br /&gt;add constraint invoice_notnull CHECK( inv_line IS NOT NULL )&lt;br /&gt;Check the constraints&lt;br /&gt;SQL&gt; select constraint_name, constraint_type, table_name&lt;br /&gt;  2  from   user_constraints&lt;br /&gt;  3  where  table_name IN ('INVOICE','INV_LINE_TABLE')&lt;br /&gt;  4  order  by table_name&lt;br /&gt;  5  /&lt;br /&gt;CONSTRAINT_NAME                C TABLE_NAME&lt;br /&gt;------------------------------ - ------------------------------&lt;br /&gt;LIGNUM_NOTNULL                 C INV_LINE_TABLE&lt;br /&gt;LIGCODE_UNIQUE                 U INV_LINE_TABLE&lt;br /&gt;LIGTVA_CHECK                   C INV_LINE_TABLE&lt;br /&gt;SYS_C0011658                   U INVOICE&lt;br /&gt;INVOICE_NOTNULL                C INVOICE&lt;br /&gt;SQL&gt; select constraint_name, column_name, table_name&lt;br /&gt;  2  from   user_cons_columns&lt;br /&gt;  3  where  table_name IN ('INVOICE','INV_LINE_TABLE')&lt;br /&gt;  4  order  by table_name&lt;br /&gt;  5  /&lt;br /&gt;CONSTRAINT_NAME                COLUMN_NAME          TABLE_NAME&lt;br /&gt;------------------------------ -------------------- ------------------&lt;br /&gt;LIGNUM_NOTNULL                 LIG_NUM              INV_LINE_TABLE&lt;br /&gt;LIGCODE_UNIQUE                 LIG_CODE             INV_LINE_TABLE&lt;br /&gt;LIGTVA_CHECK                   LIG_TVA              INV_LINE_TABLE&lt;br /&gt;SYS_C0011658                   SYS_NC0000400005$    INVOICE&lt;br /&gt;INVOICE_NOTNULL                SYS_NC0000400005$    INVOICE&lt;br /&gt;INVOICE_NOTNULL                INV_LINE             INVOICE&lt;br /&gt;6 rows selected.&lt;br /&gt;8.1 Insertion&lt;br /&gt;Add a line in the INVOICE table&lt;br /&gt;Use the INSERT statement with all the constructors needed for the collection&lt;br /&gt;SQL&gt; INSERT INTO INVOICE&lt;br /&gt;  2  VALUES&lt;br /&gt;  3  (&lt;br /&gt;  4     1&lt;br /&gt;  5    ,1000&lt;br /&gt;  6    ,SYSDATE&lt;br /&gt;  7    , TYP_TAB_LIG_ENV  -- Table of objects constructor&lt;br /&gt;  8      (&lt;br /&gt;  9         TYP_LIG_ENV( 1 ,'COD_01', 1000, 5.0, 1 ) -– object constructor&lt;br /&gt; 10      )&lt;br /&gt; 11  )&lt;br /&gt; 12  /&lt;br /&gt;1 row created.&lt;br /&gt;Add a line to the collection&lt;br /&gt;Use the INSERT INTO TABLE statement&lt;br /&gt;INSERT INTO TABLE&lt;br /&gt;  ( SELECT the_collection FROM the_table WHERE ... )&lt;br /&gt;The sub query must return a single collection row.&lt;br /&gt;SQL&gt; INSERT INTO TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1)&lt;br /&gt;  2  VALUES( TYP_LIG_ENV( 2 ,'COD_02', 50, 5.0, 10 ) )&lt;br /&gt;  3  /&lt;br /&gt;1 row created.&lt;br /&gt;Multiple inserts&lt;br /&gt;You can add more than one element in a collection by using the SELECT statement instead of the VALUES keyword.&lt;br /&gt;INSERT INTO TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1)&lt;br /&gt;SELECT nt.* FROM TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;/&lt;br /&gt;8.2 Update&lt;br /&gt;8.2.1 Nested table&lt;br /&gt;Use the UPDATE TABLE statement&lt;br /&gt;UPDATE TABLE&lt;br /&gt;  ( SELECT the_collection FROM the_table WHERE ... ) alias&lt;br /&gt;SET&lt;br /&gt;  Alias.col_name = ...&lt;br /&gt;WHERE ...&lt;br /&gt;The sub query must return a single collection row.&lt;br /&gt;Update a single row of the collection&lt;br /&gt;SQL&gt; UPDATE TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  2  SET    nt.ligqty = 10&lt;br /&gt;  3  WHERE  nt.lig_num = 1&lt;br /&gt;  4  /&lt;br /&gt;1 row updated.&lt;br /&gt;Update all the rows of the collection&lt;br /&gt;SQL&gt; UPDATE TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  2  SET    nt.lig_pht = nt.lig_pht * .1&lt;br /&gt;  3  /&lt;br /&gt;2 rows updated.&lt;br /&gt;8.2.2 Varray&lt;br /&gt;It is not possible to update one element of a VARRAY collection with SQL.&lt;br /&gt;You cannot use the TABLE keyword for this purpose (because Varrays are not stored in particular table like Nested tables).&lt;br /&gt;So, a single VARRAY element of a collection must be updated within a PL/SQL block:&lt;br /&gt;-- varray of invoice lines --&lt;br /&gt;CREATE TYPE TYP_VAR_LIG_ENV AS VARRAY(5) OF TYP_LIG_ENV ;&lt;br /&gt;-- table of invoices with varray --&lt;br /&gt;CREATE TABLE INVOICE_V (&lt;br /&gt;  inv_num     Number(9),&lt;br /&gt;  inv_numcli  Number(6),&lt;br /&gt;  inv_date    Date,&lt;br /&gt;  inv_line    TYP_VAR_LIG_ENV ) ;&lt;br /&gt;-- insert a row --&lt;br /&gt;Insert into INVOICE_V&lt;br /&gt;Values&lt;br /&gt;(&lt;br /&gt;  1, 1000, SYSDATE,&lt;br /&gt;  TYP_VAR_LIG_ENV&lt;br /&gt;  (&lt;br /&gt;     TYP_LIG_ENV( 1, 'COD_01', 1000, 5, 1 ),&lt;br /&gt;     TYP_LIG_ENV( 2, 'COD_02',  500, 5, 10 ),&lt;br /&gt;     TYP_LIG_ENV( 3, 'COD_03',   10, 5, 100 )        &lt;br /&gt;  )&lt;br /&gt;) ;&lt;br /&gt;SQL&gt; -- Query the varray collection --&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     v_table   TYP_VAR_LIG_ENV ;&lt;br /&gt;  3     LC$Head   Varchar2(200) ;&lt;br /&gt;  4     LC$Lig    Varchar2(200) ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6     LC$Head := 'Num Code       Pht        Tva        Qty' ;&lt;br /&gt;  7     Select inv_line Into v_table From INVOICE_V Where inv_num = 1 For Update of inv_line ;&lt;br /&gt;  8     dbms_output.put_line ( LC$Head ) ;&lt;br /&gt;  9     For i IN v_table.FIRST .. v_table.LAST Loop&lt;br /&gt; 10       LC$Lig := Rpad(To_char( v_table(i).lig_num ),3)  ' '&lt;br /&gt; 11            Rpad(v_table(i).lig_code, 10)  ' '&lt;br /&gt; 12            Rpad(v_table(i).lig_pht,10)  ' '&lt;br /&gt; 13            Rpad(v_table(i).lig_tva,10)  ' '&lt;br /&gt; 14            v_table(i).ligqty ;        &lt;br /&gt; 15       dbms_output.put_line( LC$Lig ) ;       &lt;br /&gt; 16     End loop ;&lt;br /&gt; 17  End ;&lt;br /&gt; 18  /&lt;br /&gt;Num Code       Pht        Tva        Qty&lt;br /&gt;1   COD_01     1000       5          1&lt;br /&gt;2   COD_02     500        5          10&lt;br /&gt;3   COD_03     10         5          100&lt;br /&gt;PL/SQL procedure successfully completed..&lt;br /&gt;Update the second line of the varray to change the quantity&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     v_table   TYP_VAR_LIG_ENV ;&lt;br /&gt;  3  Begin&lt;br /&gt;  4     Select inv_line&lt;br /&gt;  5     Into   v_table&lt;br /&gt;  6     From   INVOICE_V&lt;br /&gt;  7     Where  inv_num = 1&lt;br /&gt;  8     For Update of inv_line ;&lt;br /&gt;  9     v_table(2).ligqty := 2 ; -- update the second element&lt;br /&gt; 10     Update INVOICE_V Set inv_line = v_table Where inv_num = 1 ;&lt;br /&gt; 11  End ;&lt;br /&gt; 12  /&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Display the new varray:&lt;br /&gt;SQL&gt; -- Query the varray collection --&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     v_table   TYP_VAR_LIG_ENV ;&lt;br /&gt;  3     LC$Head   Varchar2(200) ;&lt;br /&gt;  4     LC$Lig    Varchar2(200) ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6     LC$Head := 'Num Code       Pht        Tva        Qty' ;&lt;br /&gt;  7     Select inv_line Into v_table From INVOICE_V Where inv_num = 1 For Update of inv_line ;&lt;br /&gt;  8     dbms_output.put_line ( LC$Head ) ;&lt;br /&gt;  9     For i IN v_table.FIRST .. v_table.LAST Loop&lt;br /&gt; 10       LC$Lig := Rpad(To_char( v_table(i).lig_num ),3)  ' '&lt;br /&gt; 11            Rpad(v_table(i).lig_code, 10)  ' '&lt;br /&gt; 12            Rpad(v_table(i).lig_pht,10)  ' '&lt;br /&gt; 13            Rpad(v_table(i).lig_tva,10)  ' '&lt;br /&gt; 14            v_table(i).ligqty ;        &lt;br /&gt; 15       dbms_output.put_line( LC$Lig ) ;       &lt;br /&gt; 16     End loop ;&lt;br /&gt; 17  End ;&lt;br /&gt; 18  /&lt;br /&gt;Num Code       Pht        Tva        Qty&lt;br /&gt;1   COD_01     1000       5          1&lt;br /&gt;2   COD_02     500        5          2&lt;br /&gt;3   COD_03     10         5          100&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;8.3 Delete&lt;br /&gt;8.3.1 Nested table&lt;br /&gt;Use the DELETE FROM TABLE statement&lt;br /&gt;Delete a single collection row&lt;br /&gt;DELETE FROM TABLE&lt;br /&gt;  ( SELECT the_collection FROM the_table WHERE ... ) alias&lt;br /&gt;WHERE alias.col_name = ...&lt;br /&gt;SQL&gt; DELETE FROM TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  2  WHERE nt.lig_num = 2&lt;br /&gt;  3  /&lt;br /&gt;1 row deleted.&lt;br /&gt;Delete all the collection rows&lt;br /&gt;SQL&gt; DELETE FROM TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  2  /&lt;br /&gt;1 row deleted.&lt;br /&gt;Use of a PL/SQL record to handle the whole structure&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_REC IS RECORD&lt;br /&gt;  3    (&lt;br /&gt;  4      inv_num     INVOICE.inv_num%Type,&lt;br /&gt;  5      inv_numcli  INVOICE.inv_numcli%Type,&lt;br /&gt;  6      inv_date    INVOICE.inv_date%Type,&lt;br /&gt;  7      inv_line    INVOICE.inv_line%Type   –- collection line&lt;br /&gt;  8    );&lt;br /&gt;  9    rec_inv  TYP_REC ;&lt;br /&gt; 10    Cursor C_INV IS Select * From INVOICE ;&lt;br /&gt; 11  Begin&lt;br /&gt; 12     Open C_INV ;&lt;br /&gt; 13     Loop&lt;br /&gt; 14       Fetch C_INV into rec_inv ;&lt;br /&gt; 15       Exit when C_INV%NOTFOUND ;&lt;br /&gt; 16       For i IN 1 .. rec_inv.inv_line.LAST Loop   –- loop through the collection lines&lt;br /&gt; 17         dbms_output.put_line( 'Numcli/Date '  rec_inv.inv_numcli  '/'  rec_inv.inv_date&lt;br /&gt; 18            ' Line '  rec_inv.inv_line(i).lig_num&lt;br /&gt; 19            ' code '  rec_inv.inv_line(i).lig_code  ' Qty '&lt;br /&gt; 20            To_char(rec_inv.inv_line(i).ligqty) ) ;&lt;br /&gt; 21       End loop ;&lt;br /&gt; 22     End loop ; &lt;br /&gt; 23  End ;&lt;br /&gt; 24  /&lt;br /&gt;Numcli/Date 1000/11/11/05 Line 1 code COD_01 Qty 1&lt;br /&gt;Numcli/Date 1000/11/11/05 Line 2 code COD_02 Qty 10&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;8.3.2 Varray&lt;br /&gt;Varrays are more complicated to handle.&lt;br /&gt;It is not possible to delete a single element in a Varray collection.&lt;br /&gt;To do the job, you need a PL/SQL block and a temporary Varray that keep only the lines that are not deleted.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     v_table   TYP_VAR_LIG_ENV ;&lt;br /&gt;  3     v_tmp     v_table%Type := TYP_VAR_LIG_ENV() ;&lt;br /&gt;  4     ind       pls_integer  := 1 ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6     -- select the collection --&lt;br /&gt;  7     Select inv_line&lt;br /&gt;  8     Into   v_table&lt;br /&gt;  9     From   INVOICE_V&lt;br /&gt; 10     Where  inv_num = 1&lt;br /&gt; 11     For Update of inv_line ;&lt;br /&gt; 12     -- Extend the temporary varray --&lt;br /&gt; 13     v_tmp.EXTEND(v_table.LIMIT) ;  &lt;br /&gt; 14     For i IN v_table.FIRST .. v_table.LAST Loop&lt;br /&gt; 15        If v_table(i).lig_num &lt;&gt; 2 Then&lt;br /&gt; 16           v_tmp(ind) := v_table(i) ; ind := ind + 1 ;&lt;br /&gt; 17        End if ;&lt;br /&gt; 18     End loop ;&lt;br /&gt; 19    &lt;br /&gt; 20     Update INVOICE_V Set inv_line = v_tmp Where inv_num = 1 ;&lt;br /&gt; 21  End ;&lt;br /&gt; 22  /&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Display the new collection:&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     v_table   TYP_VAR_LIG_ENV ;&lt;br /&gt;  3     LC$Head   Varchar2(200) ;&lt;br /&gt;  4     LC$Lig    Varchar2(200) ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6     LC$Head := 'Num Code       Pht        Tva        Qty' ;&lt;br /&gt;  7     Select inv_line Into v_table From INVOICE_V Where inv_num = 1 For Update of inv_line ;&lt;br /&gt;  8     dbms_output.put_line ( LC$Head ) ;&lt;br /&gt;  9     For i IN v_table.FIRST .. v_table.LAST Loop&lt;br /&gt; 10       LC$Lig := Rpad(To_char( v_table(i).lig_num ),3)  ' '&lt;br /&gt; 11            Rpad(v_table(i).lig_code, 10)  ' '&lt;br /&gt; 12            Rpad(v_table(i).lig_pht,10)  ' '&lt;br /&gt; 13            Rpad(v_table(i).lig_tva,10)  ' '&lt;br /&gt; 14            v_table(i).ligqty ;        &lt;br /&gt; 15       dbms_output.put_line( LC$Lig ) ;       &lt;br /&gt; 16     End loop ;&lt;br /&gt; 17  End ;&lt;br /&gt; 18  /&lt;br /&gt;Num Code       Pht        Tva        Qty&lt;br /&gt;1   COD_01     1000       5          1&lt;br /&gt;3   COD_03     10         5          100&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;The second line of the Varray has been deleted.&lt;br /&gt;Here is a Procedure that do the job with any Varray collection&lt;br /&gt;CREATE OR REPLACE PROCEDURE DEL_ELEM_VARRAY&lt;br /&gt;(&lt;br /&gt;  PC$Table in Varchar2, -- Main table name&lt;br /&gt;  PC$Pk    in Varchar2, -- PK to identify the main table row&lt;br /&gt;  PC$Type  in Varchar2, -- Varray TYPE&lt;br /&gt;  PC$Coll  in Varchar2, -- Varray column name&lt;br /&gt;  PC$Index in Varchar2, -- value of PK&lt;br /&gt;  PC$Col   in Varchar2, -- Varray column&lt;br /&gt;  PC$Value in Varchar2  -- Varray column value to delete&lt;br /&gt;)&lt;br /&gt;IS&lt;br /&gt;  LC$Req Varchar2(2000);&lt;br /&gt;Begin&lt;br /&gt;LC$Req := 'Declare'&lt;br /&gt;  ' v_table '  PC$Type  ';'&lt;br /&gt;  ' v_tmp v_table%Type := '  PC$Type  '() ;'&lt;br /&gt;  ' ind  pls_integer := 1 ;'&lt;br /&gt;  'Begin'&lt;br /&gt;  ' Select '  PC$Coll&lt;br /&gt;  ' Into  v_table'&lt;br /&gt;  ' From  '  PC$Table&lt;br /&gt;  ' Where '  PC$Pk  '='''  PC$Index  ''''&lt;br /&gt;  ' For Update of '  PC$Coll  ';'&lt;br /&gt;  ' v_tmp.EXTEND(v_table.LIMIT) ;'&lt;br /&gt;  ' For i IN v_table.FIRST .. v_table.LAST Loop'&lt;br /&gt;     ' If v_table(i).'  PC$Col '&lt;&gt;'''  PC$Value  ''' Then'&lt;br /&gt;     '   v_tmp(ind) := v_table(i) ; ind := ind + 1 ;'&lt;br /&gt;     ' End if ;'&lt;br /&gt;  ' End loop ;'&lt;br /&gt;  ' Update '  PC$Table  ' Set '  PC$Coll  ' = v_tmp Where '  PC$Pk  '='''  PC$Index  ''';'&lt;br /&gt;  ' End;' ;&lt;br /&gt;  Execute immediate LC$Req ;&lt;br /&gt;End ;&lt;br /&gt;/&lt;br /&gt;Let’s delete the third element of the Varray:&lt;br /&gt;SQL&gt; Begin&lt;br /&gt;  2   DEL_ELEM_VARRAY&lt;br /&gt;  3   (&lt;br /&gt;  4     'INVOICE_V',&lt;br /&gt;  5     'inv_num',&lt;br /&gt;  6     'TYP_VAR_LIG_ENV',&lt;br /&gt;  7     'inv_line',&lt;br /&gt;  8     '1',&lt;br /&gt;  9     'lig_num',&lt;br /&gt; 10     '3'&lt;br /&gt; 11   );&lt;br /&gt; 12  End ;&lt;br /&gt; 13  /&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;8.4 Query&lt;br /&gt;Query the whole table&lt;br /&gt;SQL&gt; select * from INVOICE&lt;br /&gt;  2  /&lt;br /&gt;   INV_NUM INV_NUMCLI INV_DATE&lt;br /&gt;---------- ---------- --------&lt;br /&gt;INV_LINE(LIG_NUM, LIG_CODE, LIG_PHT, LIG_TVA, LIGQTY)&lt;br /&gt;------------------------------------------------------------------------------------------&lt;br /&gt;         3       1001 11/11/05&lt;br /&gt;TYP_TAB_LIG_ENV()&lt;br /&gt;         2       1002 12/11/05&lt;br /&gt;TYP_TAB_LIG_ENV(TYP_LIG_ENV(1, 'COD_03', 1000, 5, 1))&lt;br /&gt;         1       1000 11/11/05&lt;br /&gt;TYP_TAB_LIG_ENV(TYP_LIG_ENV(1, 'COD_01', 1000, 5, 1), TYP_LIG_ENV(2, 'COD_02', 50, 5, 10))&lt;br /&gt;Not easy to read !&lt;br /&gt;Let’s try another syntax:&lt;br /&gt;SQL&gt; SELECT t1.inv_num, t1.inv_numcli, t1.inv_date, t2.* FROM invoice t1, TABLE(t1.inv_line) t2&lt;br /&gt;  2  ORDER BY t1.inv_num, t2.lig_num desc&lt;br /&gt;  3  /&lt;br /&gt;   INV_NUM INV_NUMCLI INV_DATE    LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- ---------- -------- ---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1       1000 11/11/05          2 COD_02                       50          5         10&lt;br /&gt;         1       1000 11/11/05          1 COD_01                     1000          5          1&lt;br /&gt;         2       1002 12/11/05          1 COD_03                     1000          5          1&lt;br /&gt;We can see that the collection is treated as a table with the TABLE keyword.&lt;br /&gt;The collection could be sorted on any column.&lt;br /&gt;Query a particular row of the main table and the corresponding collection’s rows&lt;br /&gt;SQL&gt; SELECT   t1.inv_num, t1.inv_numcli, t1.inv_date, t2.* FROM invoice t1, TABLE(t1.inv_line) t2&lt;br /&gt;  2  WHERE    t1.inv_num = 1&lt;br /&gt;  3  ORDER BY t1.inv_num, t2.lig_num desc&lt;br /&gt;  4  /&lt;br /&gt;   INV_NUM INV_NUMCLI INV_DATE    LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- ---------- -------- ---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1       1000 11/11/05          2 COD_02                       50          5         10&lt;br /&gt;         1       1000 11/11/05          1 COD_01                     1000          5          1&lt;br /&gt;Query one main table row with a particular collection row&lt;br /&gt;SQL&gt; SELECT   t1.inv_num, t1.inv_numcli, t1.inv_date, t2.* FROM invoice t1, TABLE(t1.inv_line) t2&lt;br /&gt;  2  WHERE    t1.inv_num  = 1&lt;br /&gt;  3  AND      t2.lig_code = 'COD_01'&lt;br /&gt;  4  /&lt;br /&gt;   INV_NUM INV_NUMCLI INV_DATE    LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- ---------- -------- ---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1       1000 11/11/05          1 COD_01                     1000          5          1&lt;br /&gt;Query only the collection lines&lt;br /&gt;SQL&gt; select t2.* from invoice t1,TABLE(t1.inv_line) t2&lt;br /&gt;  2  /&lt;br /&gt;   LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1 COD_03                     1000          5          1&lt;br /&gt;         1 COD_01                     1000          5          1&lt;br /&gt;         2 COD_02                       50          5         10&lt;br /&gt;Query the collection for a particular parent row&lt;br /&gt;Use the SELECT FROM TABLE statement&lt;br /&gt;SQL&lt;br /&gt;SELECT FROM TABLE&lt;br /&gt;  ( SELECT the_collection FROM the_table WHERE ... )&lt;br /&gt;SQL&gt;  select * from TABLE(SELECT inv_line FROM INVOICE WHERE inv_num = 1)&lt;br /&gt;  2  /&lt;br /&gt;   LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1 COD_01                     1000          5          1&lt;br /&gt;         2 COD_02                       50          5         10&lt;br /&gt;Another syntax:&lt;br /&gt;SQL&gt; Select t2.* from invoice t1,TABLE(t1.inv_line) t2&lt;br /&gt;  2  Where  t1.inv_numcli = 1000&lt;br /&gt;  3  /&lt;br /&gt;   LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1 COD_01                     1000          5          1&lt;br /&gt;         2 COD_02                       50          5         10&lt;br /&gt;PL/SQL&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE TYP_REC IS RECORD&lt;br /&gt;  3    (&lt;br /&gt;  4      num   INV_LINE_TABLE.LIG_NUM%Type,&lt;br /&gt;  5      code  INV_LINE_TABLE.LIG_CODE%Type,&lt;br /&gt;  6      pht   INV_LINE_TABLE.LIG_PHT%Type,&lt;br /&gt;  7      tva   INV_LINE_TABLE.LIG_TVA%Type,&lt;br /&gt;  8      qty   INV_LINE_TABLE.LIGQTY%Type&lt;br /&gt;  9    );&lt;br /&gt; 10    -- Table of records --&lt;br /&gt; 11    TYPE TAB_REC IS TABLE OF TYP_REC ;&lt;br /&gt; 12    t_rec  TAB_REC ;&lt;br /&gt; 13  Begin&lt;br /&gt; 14    -- Store the lines into the table of records --&lt;br /&gt; 15    Select *&lt;br /&gt; 16    BULK COLLECT&lt;br /&gt; 17    Into   t_rec&lt;br /&gt; 18    from   TABLE(SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt ;&lt;br /&gt; 19    -- Print the record attributes of each line--&lt;br /&gt; 20    For i IN t_rec.FIRST .. t_rec.LAST Loop&lt;br /&gt; 21      dbms_output.put_line( '** Line  = '  t_rec(i).num  ' **' ) ;&lt;br /&gt; 22      dbms_output.put_line( 'Code     = '  t_rec(i).code ) ;&lt;br /&gt; 23      dbms_output.put_line( 'Price    = '  t_rec(i).pht ) ;&lt;br /&gt; 24      dbms_output.put_line( 'Tax rate = '  t_rec(i).tva ) ;&lt;br /&gt; 25      dbms_output.put_line( 'Quantity = '  t_rec(i).qty ) ;&lt;br /&gt; 26    End loop ;&lt;br /&gt; 27  End ;    &lt;br /&gt; 28  /&lt;br /&gt;** Line  = 1 **&lt;br /&gt;Code     = COD_01&lt;br /&gt;Price    = 1000&lt;br /&gt;Tax rate = 5&lt;br /&gt;Quantity = 1&lt;br /&gt;** Line  = 2 **&lt;br /&gt;Code     = COD_02&lt;br /&gt;Price    = 50&lt;br /&gt;Tax rate = 5&lt;br /&gt;Quantity = 10&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Query a particular column of the collection&lt;br /&gt;SQL&lt;br /&gt;SQL&gt; SELECT nt.lig_code, nt.lig_pht&lt;br /&gt;  2  FROM   TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  3  WHERE  nt.lig_num = 1&lt;br /&gt;  4  /&lt;br /&gt;LIG_CODE                LIG_PHT&lt;br /&gt;-------------------- ----------&lt;br /&gt;COD_01                     1000&lt;br /&gt;Another syntax:&lt;br /&gt;SQL&gt; Select t2.* from invoice t1,TABLE(t1.inv_line) t2&lt;br /&gt;  2  Where  t1.inv_numcli = 1000&lt;br /&gt;  3  And    t2.lig_num = 1&lt;br /&gt;  4  /&lt;br /&gt;   LIG_NUM LIG_CODE                LIG_PHT    LIG_TVA     LIGQTY&lt;br /&gt;---------- -------------------- ---------- ---------- ----------&lt;br /&gt;         1 COD_01                     1000          5          1&lt;br /&gt;PL/SQL&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE t_rec IS RECORD&lt;br /&gt;  3    (&lt;br /&gt;  4      num   INV_LINE_TABLE.LIG_NUM%Type,&lt;br /&gt;  5      code  INV_LINE_TABLE.LIG_CODE%Type,&lt;br /&gt;  6      pht   INV_LINE_TABLE.LIG_PHT%Type,&lt;br /&gt;  7      tva   INV_LINE_TABLE.LIG_TVA%Type,&lt;br /&gt;  8      qty   INV_LINE_TABLE.LIGQTY%Type&lt;br /&gt;  9    );&lt;br /&gt; 10    rec t_rec ;&lt;br /&gt; 11  Begin&lt;br /&gt; 12    -- Store the line into the record --&lt;br /&gt; 13    Select *&lt;br /&gt; 14    Into   rec&lt;br /&gt; 15    from   TABLE(SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt; 16    Where  nt.lig_num = 1 ;&lt;br /&gt; 17    -- Print the record attributes --&lt;br /&gt; 18    dbms_output.put_line( 'Code     = '  rec.code ) ;&lt;br /&gt; 19    dbms_output.put_line( 'Price    = '  rec.pht ) ;&lt;br /&gt; 20    dbms_output.put_line( 'Tax rate = '  rec.tva ) ;&lt;br /&gt; 21    dbms_output.put_line( 'Quantity = '  rec.qty ) ;    &lt;br /&gt; 22  End ;&lt;br /&gt; 23  /&lt;br /&gt;Code     = COD_01&lt;br /&gt;Price    = 1000&lt;br /&gt;Tax rate = 5&lt;br /&gt;Quantity = 1&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;Query both table and collection&lt;br /&gt;All the collection’s rows&lt;br /&gt;SQL&lt;br /&gt;SQL&gt; SELECT v.inv_numcli, v.inv_date, nt.lig_code, nt.lig_pht&lt;br /&gt;  2  FROM   INVOICE v,  &lt;br /&gt;  3         TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  4  WHERE  v.inv_num = 1&lt;br /&gt;  5  /&lt;br /&gt;INV_NUMCLI INV_DATE LIG_CODE                LIG_PHT&lt;br /&gt;---------- -------- -------------------- ----------&lt;br /&gt;      1000 11/11/05 COD_01                     1000&lt;br /&gt;      1000 11/11/05 COD_02                       50&lt;br /&gt;A particular collection’s row&lt;br /&gt;SQL&gt; SELECT v.inv_numcli, v.inv_date, nt.lig_code, nt.lig_pht&lt;br /&gt;  2  FROM   INVOICE v,  &lt;br /&gt;  3         TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  4  WHERE  v.inv_num = 1&lt;br /&gt;  5  AND    nt.lig_num = 1&lt;br /&gt;  6  /&lt;br /&gt;INV_NUMCLI INV_DATE LIG_CODE                LIG_PHT&lt;br /&gt;---------- -------- -------------------- ----------&lt;br /&gt;      1000 11/11/05 COD_01                     1000&lt;br /&gt;PL/SQL&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    invoice_rec  INVOICE%ROWTYPE ;&lt;br /&gt;  3    LC$Print  Varchar2(512) ; &lt;br /&gt;  4  Begin&lt;br /&gt;  5    -- Select the INVOICE line --&lt;br /&gt;  6    Select *&lt;br /&gt;  7    Into   invoice_rec&lt;br /&gt;  8    From   INVOICE&lt;br /&gt;  9    Where  inv_numcli = 1000 ;&lt;br /&gt; 10    -- Print the parent and collection attributes--&lt;br /&gt; 11    For i IN invoice_rec.inv_line.FIRST .. invoice_rec.inv_line.LAST Loop&lt;br /&gt; 12      LC$Print := invoice_rec.inv_numcli&lt;br /&gt; 13    ' - '  To_Char(invoice_rec.inv_date,'DD/MM/YYYY')&lt;br /&gt; 14    ' - '  invoice_rec.inv_line(i).lig_num&lt;br /&gt; 15    ' - '  invoice_rec.inv_line(i).lig_code&lt;br /&gt; 16    ' - '  invoice_rec.inv_line(i).lig_pht&lt;br /&gt; 17    ' - '  invoice_rec.inv_line(i).lig_tva&lt;br /&gt; 18    ' - '  invoice_rec.inv_line(i).ligqty ;    &lt;br /&gt; 19      dbms_output.put_line( LC$Print ) ;&lt;br /&gt; 20    End loop ;&lt;br /&gt; 21  End ;    &lt;br /&gt; 22  /&lt;br /&gt;1000 - 11/11/2005 - 1 - COD_01 - 1000 - 5 - 1&lt;br /&gt;1000 - 11/11/2005 - 2 - COD_02 - 50 - 5 - 10&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;What happens when the collection is empty ?&lt;br /&gt;Let’s insert a row with an empty collection:&lt;br /&gt;SQL&gt; INSERT INTO INVOICE&lt;br /&gt;  2   VALUES&lt;br /&gt;  3   (&lt;br /&gt;  4      3&lt;br /&gt;  5     ,1001&lt;br /&gt;  6     ,SYSDATE&lt;br /&gt;  7     , TYP_TAB_LIG_ENV()  -- Empty collection&lt;br /&gt;  8   )  &lt;br /&gt;  9   /&lt;br /&gt;1 row created.&lt;br /&gt;SQL&gt; SELECT v.inv_numcli, v.inv_date, nt.lig_code, nt.lig_pht&lt;br /&gt;  2  FROM   INVOICE v,  &lt;br /&gt;  3         TABLE (SELECT inv_line FROM INVOICE WHERE inv_num = 1) nt&lt;br /&gt;  4  WHERE  v.inv_num = 1&lt;br /&gt;  5  /&lt;br /&gt;INV_NUMCLI INV_DATE LIG_CODE                LIG_PHT&lt;br /&gt;---------- -------- -------------------- ----------&lt;br /&gt;      1000 11/11/05 COD_01                     1000&lt;br /&gt;      1000 11/11/05 COD_02                       50&lt;br /&gt;The client 1001 does not appears in the query&lt;br /&gt;You can use NESTED CURSOR to get information on rows where collection is NULL or EMPTY&lt;br /&gt;SQL&gt; SELECT&lt;br /&gt;  2     v.inv_numcli,&lt;br /&gt;  3     v.inv_date,&lt;br /&gt;  4     CURSOR( SELECT nt.lig_code, nt.lig_pht FROM TABLE (inv_line) nt)&lt;br /&gt;  5  FROM   INVOICE v&lt;br /&gt;  6  /&lt;br /&gt;INV_NUMCLI INV_DATE CURSOR(SELECTNT.LIG_&lt;br /&gt;---------- -------- --------------------&lt;br /&gt;      1001 11/11/05 CURSOR STATEMENT : 3&lt;br /&gt;CURSOR STATEMENT : 3&lt;br /&gt;no rows selected&lt;br /&gt;INV_NUMCLI INV_DATE CURSOR(SELECTNT.LIG_&lt;br /&gt;---------- -------- --------------------&lt;br /&gt;      1000 11/11/05 CURSOR STATEMENT : 3&lt;br /&gt;CURSOR STATEMENT : 3&lt;br /&gt;LIG_CODE                LIG_PHT&lt;br /&gt;-------------------- ----------&lt;br /&gt;COD_01                     1000&lt;br /&gt;COD_02                       50&lt;br /&gt;      1001 11/11/05 CURSOR STATEMENT : 3&lt;br /&gt;CURSOR STATEMENT : 3&lt;br /&gt;no rows selected&lt;br /&gt;8.5  Aggregate and ensemblist function&lt;br /&gt;8.5.1  Aggregate funtions&lt;br /&gt;SQL&gt; -- count of number of elements in the collection --&lt;br /&gt;SQL&gt; Select COUNT(*) from TABLE( SELECT inv_line FROM INVOICE WHERE inv_num = 1 )&lt;br /&gt;  2  /&lt;br /&gt;  COUNT(*)&lt;br /&gt;----------&lt;br /&gt;         2&lt;br /&gt;SQL&gt; -- maximum quantity of all the collection rows --&lt;br /&gt;SQL&gt; Select MAX(ligqty) from TABLE( SELECT inv_line FROM INVOICE WHERE inv_num = 1 )&lt;br /&gt;  2  /&lt;br /&gt;MAX(LIGQTY)&lt;br /&gt;-----------&lt;br /&gt;         10&lt;br /&gt;SQL&gt; -- Number of collection lines for each invoice --&lt;br /&gt;SQL&gt; Select   i.inv_numcli, COUNT(nt.lig_num)&lt;br /&gt;  2  From     invoice i, TABLE( i.inv_line) nt&lt;br /&gt;  3  Group by i.inv_numcli&lt;br /&gt;  4  /&lt;br /&gt;INV_NUMCLI COUNT(NT.LIG_NUM)&lt;br /&gt;---------- -----------------&lt;br /&gt;      1000                 2&lt;br /&gt;      1002                 1&lt;br /&gt;SQL&gt; -- Number of distinct product code for each invoice --&lt;br /&gt;SQL&gt; Select   i.inv_numcli, COUNT(DISTINCT(nt.lig_code))&lt;br /&gt;  2  From     invoice i, TABLE( i.inv_line) nt&lt;br /&gt;  3  Group by i.inv_numcli&lt;br /&gt;  4  /&lt;br /&gt;INV_NUMCLI COUNT(DISTINCT(NT.LIG_CODE))&lt;br /&gt;---------- ----------------------------&lt;br /&gt;      1000                            2&lt;br /&gt;      1002                            1&lt;br /&gt;SQL&gt; -- total price for each invoice --&lt;br /&gt;SQL&gt; Select   i.inv_numcli, SUM(nt.lig_pht + (( nt.lig_pht * nt.lig_tva ) / 100.0))&lt;br /&gt;  2  From     invoice i, TABLE( i.inv_line) nt&lt;br /&gt;  3  Group by i.inv_numcli&lt;br /&gt;  4  /&lt;br /&gt;INV_NUMCLI SUM(NT.LIG_PHT+((NT.LIG_PHT*NT.LIG_TVA)/100.0))&lt;br /&gt;---------- -----------------------------------------------&lt;br /&gt;      1000                                          1102,5&lt;br /&gt;      1002                                            1050&lt;br /&gt;8.5.2  Ensemblist funtions&lt;br /&gt;SQL&gt; -- lines for customers 1000 and 10002 --&lt;br /&gt;SQL&gt; Select nt.lig_code, nt.ligqty&lt;br /&gt;  2  From   invoice i, TABLE( i.inv_line ) nt&lt;br /&gt;  3  Where  i.inv_numcli = 1000&lt;br /&gt;  4  UNION&lt;br /&gt;  5  Select nt.lig_code, nt.ligqty&lt;br /&gt;  6  From   invoice i, TABLE( i.inv_line ) nt&lt;br /&gt;  7  Where  i.inv_numcli = 1002&lt;br /&gt;  8  /&lt;br /&gt;LIG_CODE                 LIGQTY&lt;br /&gt;-------------------- ----------&lt;br /&gt;COD_01                        1&lt;br /&gt;COD_02                       10&lt;br /&gt;COD_03                        1&lt;br /&gt;&lt;a name="C9"&gt;&lt;/a&gt;9. Collection and BULK COLLECT&lt;br /&gt;9.1 BULK COLLECT&lt;br /&gt;This keyword ask the SQL engine to return all the rows in one or several collections before returning to the PL/SQL engine.&lt;br /&gt;So, there is one single roundtrip for all the rows between SQL and PL/SQL engine.&lt;br /&gt;BULK COLLECT cannot be use on the client-side&lt;br /&gt;(Select)(Fetch)(execute immediate) … BULK COLLECT Into collection_name [,collection_name, …] [LIMIT max_lines] ;&lt;br /&gt;LIMIT is used to limit the number of rows returned&lt;br /&gt;SQL&gt; set serveroutput on&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE    TYP_TAB_EMP IS TABLE OF EMP.EMPNO%Type ;&lt;br /&gt;  3    Temp_no TYP_TAB_EMP ; -- collection of EMP.EMPNO%Type&lt;br /&gt;  4    Cursor  C_EMP is Select empno From EMP ;&lt;br /&gt;  5    Pass    Pls_integer := 1 ;&lt;br /&gt;  6  Begin&lt;br /&gt;  7    Open C_EMP ;&lt;br /&gt;  8    Loop&lt;br /&gt;  9      -- Fetch the table 3 by 3 --&lt;br /&gt; 10   Fetch C_EMP BULK COLLECT into Temp_no LIMIT 3 ;&lt;br /&gt; 11      Exit When C_EMP%NOTFOUND ;&lt;br /&gt; 12      For i In Temp_no.first..Temp_no.last Loop&lt;br /&gt; 13        dbms_output.put_line( 'Pass '  to_char(Pass)  ' Empno= '  Temp_no(i) ) ;&lt;br /&gt; 14      End loop ;&lt;br /&gt; 15      Pass := Pass + 1 ;&lt;br /&gt; 16    End Loop ;&lt;br /&gt; 17  End ;&lt;br /&gt; 18  /&lt;br /&gt;Pass 1 Empno= 9999&lt;br /&gt;Pass 1 Empno= 7369&lt;br /&gt;Pass 1 Empno= 7499&lt;br /&gt;Pass 2 Empno= 7521&lt;br /&gt;Pass 2 Empno= 7566&lt;br /&gt;Pass 2 Empno= 7654&lt;br /&gt;Pass 3 Empno= 7698&lt;br /&gt;Pass 3 Empno= 7782&lt;br /&gt;Pass 3 Empno= 7788&lt;br /&gt;Pass 4 Empno= 7839&lt;br /&gt;Pass 4 Empno= 7844&lt;br /&gt;Pass 4 Empno= 7876&lt;br /&gt;Pass 5 Empno= 7900&lt;br /&gt;Pass 5 Empno= 7902&lt;br /&gt;Pass 5 Empno= 7934&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;You can use the LIMIT keyword to preserve your rollback segment:&lt;br /&gt;Declare&lt;br /&gt;  TYPE    TYP_TAB_EMP IS TABLE OF EMP.EMPNO%Type ;&lt;br /&gt;  Temp_no TYP_TAB_EMP ;&lt;br /&gt;  Cursor  C_EMP is Select empno From EMP ;&lt;br /&gt;  max_lig Pls_Integer := 3 ;&lt;br /&gt;Begin&lt;br /&gt;  Open C_EMP ;&lt;br /&gt;  Loop&lt;br /&gt;    Fetch C_EMP BULK COLLECT into Temp_no LIMIT max_lig ;&lt;br /&gt;    Forall i In Temp_no.first..Temp_no.last&lt;br /&gt;        Update EMP set SAL = Round(SAL * 1.1) Where empno = Temp_no(i) ;&lt;br /&gt;    Commit ; -- Commit every 3 rows&lt;br /&gt;    Temp_no.DELETE ;&lt;br /&gt;    Exit When C_EMP%NOTFOUND ;&lt;br /&gt;  End Loop ;&lt;br /&gt;End ;&lt;br /&gt;BULK COLLECT can also be used to retrieve the result of a DML statement that uses the RETURNING INTO clause:&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TYP_TAB_EMPNO IS TABLE OF EMP.EMPNO%Type ;&lt;br /&gt;  3     TYPE    TYP_TAB_NOM   IS TABLE OF EMP.ENAME%Type ; &lt;br /&gt;  4     Temp_no TYP_TAB_EMPNO ;&lt;br /&gt;  5     Tnoms   TYP_TAB_NOM ; &lt;br /&gt;  6  Begin&lt;br /&gt;  7     -- Delete rows and return the result into the collection --&lt;br /&gt;  8     Delete From EMP where sal &gt; 3000&lt;br /&gt;  9     RETURNING empno, ename BULK COLLECT INTO Temp_no, Tnoms ;&lt;br /&gt; 10     For i in Temp_no.first..Temp_no.last Loop&lt;br /&gt; 11        dbms_output.put_line( 'Fired employee : '  To_char( Temp_no(i) )  ' '  Tnoms(i) ) ;&lt;br /&gt; 12     End  loop ;&lt;br /&gt; 13  End ;&lt;br /&gt; 14  /&lt;br /&gt;Fired employee : 7839 KING&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;9.2 FORALL&lt;br /&gt;FORALL index IN min_index .. max_index [SAVE EXCEPTION] sql_order&lt;br /&gt;This instruction allows to compute all the rows of a collection in a single pass.&lt;br /&gt;FORALL cannot be use on the client-side and can proceed one and only one statement at a time.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE   TYP_TAB_TEST IS TABLE OF TEST%ROWTYPE ;&lt;br /&gt;  3    tabrec TYP_TAB_TEST ;&lt;br /&gt;  4    CURSOR C_test is select A, B From TEST ;&lt;br /&gt;  5  Begin&lt;br /&gt;  6     -- Load the collection from the table --&lt;br /&gt;  7     Select A, B BULK COLLECT into tabrec From TEST ;&lt;br /&gt;  8    &lt;br /&gt;  9     -- Insert into the table from the collection --&lt;br /&gt; 10     Forall i in tabrec.first..tabrec.last&lt;br /&gt; 11         Insert into TEST values tabrec(i) ;&lt;br /&gt; 12     &lt;br /&gt; 13     -- Update the table from the collection --&lt;br /&gt; 14     For i in tabrec.first..tabrec.last Loop&lt;br /&gt; 15         tabrec(i).B := tabrec(i).B * 2 ;   &lt;br /&gt; 16     End loop ;&lt;br /&gt; 17    &lt;br /&gt; 18     -- Use of cursor --&lt;br /&gt; 19     Open  C_test ;&lt;br /&gt; 20     Fetch C_test BULK COLLECT Into tabrec ;&lt;br /&gt; 21     Close C_test ;&lt;br /&gt; 22        &lt;br /&gt; 23  End ;&lt;br /&gt; 24  /&lt;br /&gt;Implementation restriction&lt;br /&gt;It is not allowed to use the FORALL statement and an UPDATE order that use the SET ROW functionality&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2     TYPE    TAB_EMP is table of EMP%ROWTYPE ;&lt;br /&gt;  3     emp_tab TAB_EMP ;&lt;br /&gt;  4     Cursor  CEMP is Select * From EMP ;&lt;br /&gt;  5  Begin  &lt;br /&gt;  6     Open  CEMP;&lt;br /&gt;  7     Fetch CEMP BULK COLLECT Into emp_tab ;&lt;br /&gt;  8     Close CEMP ;&lt;br /&gt;  9    &lt;br /&gt; 10    Forall i in emp_tab.first..emp_tab.last&lt;br /&gt; 11      Update EMP set row =  emp_tab(i) where EMPNO = emp_tab(i).EMPNO ; -- ILLEGAL&lt;br /&gt; 12     &lt;br /&gt; 13  End ;&lt;br /&gt; 14  /&lt;br /&gt;    Update EMP set row =  emp_tab(i) where EMPNO = emp_tab(i).EMPNO ; -- ILLEGAL&lt;br /&gt;                                                   *&lt;br /&gt;ERROR at line 11:&lt;br /&gt;ORA-06550: line 11, column 52:&lt;br /&gt;PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND&lt;br /&gt;table of records&lt;br /&gt;You have to use a standard FOR LOOP statement:&lt;br /&gt;For i in emp_tab.first..emp_tab.last loop&lt;br /&gt;   Update EMP set row =  emp_tab(i) where EMPNO = emp_tab(i).EMPNO ;&lt;br /&gt;End loop ;&lt;br /&gt;Or use simple collections:&lt;br /&gt;Declare&lt;br /&gt;   TYPE    TAB_EMPNO   is table of EMP.EMPNO%TYPE ;&lt;br /&gt;   TYPE    TAB_EMPNAME is table of EMP.ENAME%TYPE ;&lt;br /&gt;   no_tab  TAB_EMPNO ;&lt;br /&gt;   na_tab  TAB_EMPNAME ;  &lt;br /&gt;   Cursor  CEMP is Select EMPNO, ENAME From EMP ;&lt;br /&gt;Begin  &lt;br /&gt;   Open  CEMP;&lt;br /&gt;   Fetch CEMP BULK COLLECT Into no_tab, na_tab ;&lt;br /&gt;   Close CEMP ;&lt;br /&gt;  &lt;br /&gt;  Forall i in no_tab.first..no_tab.last&lt;br /&gt;    Update EMP set ENAME = na_tab(i) where EMPNO = no_tab(i) ;&lt;br /&gt;         &lt;br /&gt;End ; &lt;br /&gt;FORALL and exceptions&lt;br /&gt;If an error is raised by the FORALL statement, all the rows processed are rolled back.&lt;br /&gt;You can save the rows that raised an error (and do not abort the process) with the SAVE EXCEPTION keyword.&lt;br /&gt;Every exception raised during execution is stored in the %BULK_EXCEPTIONS collection.&lt;br /&gt;This is a collection of records composed by two attributes:&lt;br /&gt;·         %BULK_EXCEPTIONS(n).ERROR_INDEX which contains the index number&lt;br /&gt;·         %BULK_EXCEPTIONS(n).ERROR_CODE which contains the error code&lt;br /&gt;The total amount of errors raised by the FORALL instruction is stored in the SQL%BULK_EXCEPTIONS.COUNT attribute.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE    TYP_TAB IS TABLE OF Number ;&lt;br /&gt;  3    tab     TYP_TAB := TYP_TAB( 2, 0, 1, 3, 0, 4, 5 ) ; &lt;br /&gt;  4    nb_err  Pls_integer ; &lt;br /&gt;  5  Begin&lt;br /&gt;  6     Forall i in tab.first..tab.last SAVE EXCEPTIONS&lt;br /&gt;  7         Delete from EMP where SAL = 5 / tab(i) ;&lt;br /&gt;  8  Exception&lt;br /&gt;  9    When others then   &lt;br /&gt; 10       nb_err := SQL%BULK_EXCEPTIONS.COUNT ;&lt;br /&gt; 11       dbms_output.put_line( to_char( nb_err )  ' Errors ' ) ;&lt;br /&gt; 12       For i in 1..nb_err Loop  &lt;br /&gt; 13          dbms_output.put_line( 'Index '  to_char( SQL%BULK_EXCEPTIONS(i).ERROR_INDEX )  ' Er&lt;br /&gt;ror :  '&lt;br /&gt; 14    to_char( SQL%BULK_EXCEPTIONS(i).ERROR_CODE ) ) ;&lt;br /&gt; 15       End loop ;    &lt;br /&gt; 16  End ;&lt;br /&gt; 17  /&lt;br /&gt;2 Errors&lt;br /&gt;Index 2 Error :  1476&lt;br /&gt;Index 5 Error :  1476&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;The %BULK_ROWCOUNT attribute.&lt;br /&gt;This is an INDEX-BY table that contains for each SQL order the number of rows processed.&lt;br /&gt;If no row is impacted, SQL%BULK_ROWCOUNT(n) equals 0.&lt;br /&gt;SQL&gt; Declare&lt;br /&gt;  2    TYPE   TYP_TAB_TEST IS TABLE OF TEST%ROWTYPE ;&lt;br /&gt;  3    TYPE   TYP_TAB_A IS TABLE OF TEST.A%TYPE ;&lt;br /&gt;  4    TYPE   TYP_TAB_B IS TABLE OF TEST.B%TYPE ;   &lt;br /&gt;  5    tabrec TYP_TAB_TEST ;&lt;br /&gt;  6    taba   TYP_TAB_A ;&lt;br /&gt;  7    tabb   TYP_TAB_B ;&lt;br /&gt;  8    total  Pls_integer := 0 ; &lt;br /&gt;  9    CURSOR C_test is select A, B From TEST ;&lt;br /&gt; 10  begin&lt;br /&gt; 11     -- Load the collection from the table --&lt;br /&gt; 12     Select A, B BULK COLLECT into tabrec From TEST ;&lt;br /&gt; 13 &lt;br /&gt; 14     -- Insert rows --&lt;br /&gt; 15     Forall i in tabrec.first..tabrec.last&lt;br /&gt; 16         insert into TEST values tabrec(i) ;&lt;br /&gt; 17     &lt;br /&gt; 18     For i in tabrec.first..tabrec.last Loop&lt;br /&gt; 19         total := total + SQL%BULK_ROWCOUNT(i) ;&lt;br /&gt; 20     End loop ;&lt;br /&gt; 21     &lt;br /&gt; 22     dbms_output.put_line('Total insert : '  to_char( total) ) ;&lt;br /&gt; 23         &lt;br /&gt; 24     total := 0 ;&lt;br /&gt; 25     -- Upadate rows --&lt;br /&gt; 26     For i in tabrec.first..tabrec.last loop&lt;br /&gt; 27       update TEST set row =  tabrec(i) where A = tabrec(i).A ;&lt;br /&gt; 28     End loop ;&lt;br /&gt; 29    &lt;br /&gt; 30     For i in tabrec.first..tabrec.last Loop&lt;br /&gt; 31         total := total + SQL%BULK_ROWCOUNT(i) ;&lt;br /&gt; 32     End loop ;&lt;br /&gt; 33     &lt;br /&gt; 34     dbms_output.put_line('Total upfdate : '  to_char( total) ) ;&lt;br /&gt; 35     &lt;br /&gt; 36  End ;&lt;br /&gt; 37  /&lt;br /&gt;Total insert : 20&lt;br /&gt;Total upfdate : 20&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;a name="C10"&gt;&lt;/a&gt;10. Oracle Forms and collections&lt;br /&gt;Oracle Forms, in its actual version (10.1.2) does not handle collections internally.&lt;br /&gt;However, we can handle this kind of object with a few lines of code.&lt;br /&gt;NESTED_TABLE.fmb&lt;br /&gt;This is a MASTER/DETAIL module.&lt;br /&gt;The first block (Invoice) is based on the INVOICE table&lt;br /&gt;The second block (Nested table) is based on a FROM clause&lt;br /&gt;At initialization, the dummy FROM clause is specified as:&lt;br /&gt;Select 1,2,3,4,5 from Dual.&lt;br /&gt;In the When-New-Record-Instance of the first block, we change dynamically this property:&lt;br /&gt;Declare&lt;br /&gt;  LC$Req  Varchar2(256) ;&lt;br /&gt;Begin&lt;br /&gt;  If :INVOICE.INV_NUM Is not null Then&lt;br /&gt;     -- Dynamic query on nested table block --&lt;br /&gt;     LC$Req := '(SELECT nt.lig_num, nt.lig_code, nt.lig_pht, nt.lig_tva, nt.ligqty FROM TABLE ( SELECT inv_line FROM INVOICE WHERE inv_num = '  :INVOICE.INV_NUM  ') nt)' ;&lt;br /&gt;    Go_Block('NT' );&lt;br /&gt;    Clear_Block ;&lt;br /&gt;    Set_Block_Property( 'NT', QUERY_DATA_SOURCE_NAME, LC$Req ) ;&lt;br /&gt;    :System.message_level := 25 ;&lt;br /&gt;    Execute_Query ;            &lt;br /&gt;    :System.message_level := 0 ;&lt;br /&gt;    Go_Block('INVOICE') ;&lt;br /&gt;  Else&lt;br /&gt;    Go_Block('NT' );&lt;br /&gt;    Clear_Block ;&lt;br /&gt;    Go_Block('INVOICE') ;&lt;br /&gt;  End if ;&lt;br /&gt;End ; &lt;br /&gt;Handling the nested table of the detail block&lt;br /&gt;All we have to do is to overload the standard Forms process for Insert, Update and Delete line of the collection.&lt;br /&gt;This job is done in the ON-xxx triggers of the detail block.&lt;br /&gt;Trigger ON-INSERT:&lt;br /&gt;-- Insert a line into the collection --&lt;br /&gt;INSERT INTO TABLE&lt;br /&gt; ( &lt;br /&gt;   SELECT&lt;br /&gt;      inv_line&lt;br /&gt;   FROM&lt;br /&gt;      INVOICE&lt;br /&gt;   WHERE&lt;br /&gt;      inv_num = :INVOICE.inv_num&lt;br /&gt; )&lt;br /&gt; Values&lt;br /&gt; (&lt;br /&gt;   TYP_LIG_ENV( :NT.lig_num, :NT.lig_code, :NT.lig_pht, :NT.lig_tva, :NT.ligqty )&lt;br /&gt; );&lt;br /&gt;Trigger ON-UPDATE&lt;br /&gt;-- Update the line in collection --&lt;br /&gt;UPDATE TABLE&lt;br /&gt; ( &lt;br /&gt;   SELECT&lt;br /&gt;      inv_line&lt;br /&gt;   FROM&lt;br /&gt;      INVOICE&lt;br /&gt;   WHERE&lt;br /&gt;      inv_num = :INVOICE.inv_num&lt;br /&gt; ) nt&lt;br /&gt; SET&lt;br /&gt;   VALUE(nt) = TYP_LIG_ENV( :NT.lig_num, :NT.lig_code, :NT.lig_pht, :NT.lig_tva, :NT.ligqty )&lt;br /&gt; WHERE&lt;br /&gt;   nt.lig_num = :NT.lig_num&lt;br /&gt; ;&lt;br /&gt;Trigger ON-DELETE&lt;br /&gt;-- Delete the line from the collection --&lt;br /&gt;DELETE FROM TABLE&lt;br /&gt; ( &lt;br /&gt;   SELECT&lt;br /&gt;      inv_line&lt;br /&gt;   FROM&lt;br /&gt;      INVOICE&lt;br /&gt;   WHERE&lt;br /&gt;      inv_num = :INVOICE.inv_num&lt;br /&gt; ) nt&lt;br /&gt; WHERE&lt;br /&gt;   nt.lig_num = :NT.lig_num&lt;br /&gt; ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Oracle/PLSQL, the to_number function converts a string to a number.&lt;br /&gt;The syntax for the to_number function is:&lt;br /&gt;to_number( string1, [ format_mask ], [ nls_language ] )&lt;br /&gt;string1 is the string that will be converted to a number.&lt;br /&gt;format_mask is optional. This is the format that will be used to convert string1 to a number.&lt;br /&gt;nls_language is optional. This is the nls language used to convert string1 to a number.&lt;br /&gt;&lt;br /&gt;Applies To:&lt;br /&gt;Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;to_number('1210.73', '9999.99')&lt;br /&gt;would return the number 1210.73&lt;br /&gt;to_number('546', '999')&lt;br /&gt;would return the number 546&lt;br /&gt;to_number('23', '99')&lt;br /&gt;would return the number 23&lt;br /&gt;&lt;br /&gt;Since the format_mask and nls_language parameters are optional, you can simply convert a text string to a numeric value as follows:&lt;br /&gt;to_number('1210.73'')&lt;br /&gt;would return the number 1210.73&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is a surrogate key in a table?A surrogate key is a system-generated (non-meaningful from a business perspective) primary key for purposes of ensuring uniqueness within a database table. Surrogates for DW are usually created during the Delta processing within the ETL layer. Uniqueness is usually driven by referencing one or more data elements from the source table that are considered proper rules for ensuring uniqueness. Surrogates are usually numeric data elements and many times will take ...&lt;br /&gt;&lt;br /&gt;It is some times important to create a view even if the base table does not exist and we are planning to create one but not yet decided the structure, in that case one can create force view. This view can not be accessed and it will be in 'invalid' state unless and untill you will create a base table and compile the force view.&lt;br /&gt;Force view&lt;br /&gt;When we are creating a view for an existing table that is called a normal view.&lt;br /&gt;If there is no table but we need to create a view. Then we will go for this force view. means there is no table also we can create a view by using this force key word.&lt;br /&gt;Ex:&lt;br /&gt;create or replace view force&lt;br /&gt;as&lt;br /&gt;select * from emp&lt;br /&gt;The purpose of creating view is data hiding . instead of select privilage to a table we create a view and grant select privilege&lt;br /&gt;Force views are created in real time environment as per the business needs because of two specific reasons&lt;br /&gt;1. If the structure of the base table is not completely known (ie) in some development environments the base tables may not be created w/o knowing the complete structure and defenitions.&lt;br /&gt;2. The force view scripts are reusable in datawarehousing environments where migration of data from one db to other will occus, so they use the same script in diff databases even if the base table may be created afterwads.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-7897676775754606240?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/7897676775754606240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=7897676775754606240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/7897676775754606240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/7897676775754606240'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/plsql-tables-are-plsqls-way-of.html' title=''/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-2536515328009109692</id><published>2008-04-28T10:25:00.000-03:00</published><updated>2008-04-28T10:26:50.897-03:00</updated><title type='text'>oracle full</title><content type='html'>1.     Explain the difference between a hot backup and a cold backup and the benefits associated with each.&lt;br /&gt;A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any point in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk.&lt;br /&gt;2.     You have just had to restore from backup and do not have any control files. How would you go about bringing up this database?&lt;br /&gt;I would create a text based backup control file, stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.&lt;br /&gt;3.     How do you switch from an init.ora file to a spfile?&lt;br /&gt;Issue the create spfile from pfile command.&lt;br /&gt;4.     Explain the difference between a data block, an extent and a segment.&lt;br /&gt;A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings of contiguous data blocks are called extents. All the extents that an object takes when grouped together are considered the segment of the database object.&lt;br /&gt;5.     Give two examples of how you might determine the structure of the table DEPT.&lt;br /&gt;Use the describe command or use the dbms_metadata.get_ddl package.&lt;br /&gt;6.     Where would you look for errors from the database engine?&lt;br /&gt;In the alert log.&lt;br /&gt;7.     Compare and contrast TRUNCATE and DELETE for a table.&lt;br /&gt;Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table. The difference between the two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. The delete command, on the other hand, is a DML operation, which will produce a rollback and thus take longer to complete.&lt;br /&gt;8.     Give the reasoning behind using an index.&lt;br /&gt;Faster access to data blocks in a table.&lt;br /&gt;9.     Give the two types of tables involved in producing a star schema and the type of data they hold.&lt;br /&gt;Fact tables and dimension tables. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.&lt;br /&gt;10. . What type of index should you use on a fact table?&lt;br /&gt;A Bitmap index.&lt;br /&gt;11. Give two examples of referential integrity constraints.&lt;br /&gt;A primary key and a foreign key.&lt;br /&gt;12. A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?&lt;br /&gt;Disable the foreign key constraint to the parent, drop the table, re-create the table, enable the foreign key constraint.&lt;br /&gt;13. Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.&lt;br /&gt;ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to any point in time. NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.&lt;br /&gt;14. What command would you use to create a backup control file?&lt;br /&gt;Alter database backup control file to trace.&lt;br /&gt;15. Give the stages of instance startup to a usable state where normal users may access it.&lt;br /&gt;STARTUP NOMOUNT - Instance startup&lt;br /&gt;STARTUP MOUNT - The database is mounted&lt;br /&gt;STARTUP OPEN - The database is opened&lt;br /&gt;16. What column differentiates the V$ views to the GV$ views and how?&lt;br /&gt;The INST_ID column which indicates the instance in a RAC environment the information came from.&lt;br /&gt;17. How would you go about generating an EXPLAIN plan?&lt;br /&gt;Create a plan table with utlxplan.sql.&lt;br /&gt;Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement&lt;br /&gt;Look at the explain plan with utlxplp.sql or utlxpls.sql&lt;br /&gt;18. How would you go about increasing the buffer cache hit ratio?&lt;br /&gt;Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. If a change was necessary then I would use the alter system set db_cache_size command.&lt;br /&gt;19. Explain an ORA-01555&lt;br /&gt;You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.&lt;br /&gt;20. Explain the difference between $ORACLE_HOME and $ORACLE_BASE.&lt;br /&gt;ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.&lt;br /&gt;21.  How would you determine the time zone under which a database was operating? select DBTIMEZONE from dual;&lt;br /&gt;22.  Explain the use of setting GLOBAL_NAMES equal to TRUE.&lt;br /&gt;Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.&lt;br /&gt;23.  What command would you use to encrypt a PL/SQL application?&lt;br /&gt;WRAP&lt;br /&gt;24.  Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.&lt;br /&gt;A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application, a function will return a single value. A package on the other hand is a collection of functions and procedures that are grouped together based on their commonality to a business function or application.&lt;br /&gt;25.  Explain the use of table functions.&lt;br /&gt;Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.&lt;br /&gt;26.  Name three advisory statistics you can collect.&lt;br /&gt;Buffer Cache Advice, Segment Level Statistics, &amp;amp; Timed Statistics&lt;br /&gt;27.  Where in the Oracle directory tree structure are audit traces placed?&lt;br /&gt;In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer&lt;br /&gt;28.  Explain materialized views and how they are used.&lt;br /&gt;Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.&lt;br /&gt;29.  When a user process fails, what background process cleans up after it?&lt;br /&gt;PMON&lt;br /&gt;30.  What background process refreshes materialized views?&lt;br /&gt;The Job Queue Processes.&lt;br /&gt;31.  How would you determine what sessions are connected and what resources they are waiting for?&lt;br /&gt;Use of V$SESSION and V$SESSION_WAIT&lt;br /&gt;32.  Describe what redo logs are.&lt;br /&gt;Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database.&lt;br /&gt;33.  How would you force a log switch? ALTER SYSTEM SWITCH LOGFILE;&lt;br /&gt;34.  Give two methods you could use to determine what DDL changes have been made.&lt;br /&gt;You could use Logminer or Streams&lt;br /&gt;35.  What does coalescing a tablespace do?&lt;br /&gt;Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents into large single extents.&lt;br /&gt;36.  What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?&lt;br /&gt;A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.&lt;br /&gt;37.  Name a tablespace automatically created when you create a database.&lt;br /&gt;The SYSTEM tablespace.&lt;br /&gt;38.  When creating a user, what permissions must you grant to allow them to connect to the database?&lt;br /&gt;Grant the CONNECT to the user.&lt;br /&gt;39.  How do you add a data file to a tablespace? ALTER TABLESPACE &lt;tablespace_name&gt; ADD DATAFILE &lt;datafile_name&gt; SIZE &lt;size&gt;&lt;br /&gt;40.  How do you resize a data file? ALTER DATABASE DATAFILE &lt;datafile_name&gt; RESIZE &lt;new_size&gt;;&lt;br /&gt;41.  What view would you use to look at the size of a data file? DBA_DATA_FILES&lt;br /&gt;42.  What view would you use to determine free space in a tablespace? DBA_FREE_SPACE&lt;br /&gt;43.  How would you determine who has added a row to a table?&lt;br /&gt;Turn on fine grain auditing for the table.&lt;br /&gt;44.  How can you rebuild an index? ALTER INDEX &lt;index_name&gt; REBUILD;&lt;br /&gt;45.  Explain what partitioning is and what its benefit is.&lt;br /&gt;Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.&lt;br /&gt;46.  You have just compiled a PL/SQL package but got errors, how would you view the errors? SHOW ERRORS&lt;br /&gt;47.  How can you gather statistics on a table?&lt;br /&gt;The ANALYZE command.&lt;br /&gt;48.  How can you enable a trace for a session?&lt;br /&gt;Use the DBMS_SESSION.SET_SQL_TRACE or&lt;br /&gt;Use ALTER SESSION SET SQL_TRACE = TRUE;&lt;br /&gt;49.  What is the difference between the SQL*Loader and IMPORT utilities?&lt;br /&gt;These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formatted or delimited files.&lt;br /&gt;50.  Name two files used for network connection to a database.&lt;br /&gt;TNSNAMES.ORA and SQLNET.ORA&lt;br /&gt;Technical - UNIX&lt;br /&gt;Every DBA should know something about the operating system that the database will be running on. The questions here are related to UNIX but you should equally be able to answer questions related to common Windows environments.&lt;br /&gt;1.  How do you list the files in an UNIX directory while also showing hidden files? ls -ltra&lt;br /&gt;2.  How do you execute a UNIX command in the background?&lt;br /&gt;Use the "&amp;amp;"&lt;br /&gt;3.  What UNIX command will control the default file permissions when files are created?&lt;br /&gt;Umask&lt;br /&gt;4.  Explain the read, write, and execute permissions on a UNIX directory.&lt;br /&gt;Read allows you to see and list the directory contents.&lt;br /&gt;Write allows you to create, edit and delete files and subdirectories in the directory.&lt;br /&gt;Execute gives you the previous read/write permissions plus allows you to change into the directory and execute programs or shells from the directory.&lt;br /&gt;5.  the difference between a soft link and a hard link?&lt;br /&gt;A symbolic (soft) linked file and the targeted file can be located on the same or different file system while for a hard link they must be located on the same file system.&lt;br /&gt;6.  Give the command to display space usage on the UNIX file system. df -lk&lt;br /&gt;7.  Explain iostat, vmstat and netstat.&lt;br /&gt;Iostat reports on terminal, disk and tape I/O activity.&lt;br /&gt;Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity.&lt;br /&gt;Netstat reports on the contents of network data structures.&lt;br /&gt;8.  How would you change all occurrences of a value using VI?&lt;br /&gt;Use :%s/&lt;old&gt;/&lt;new&gt;/g&lt;br /&gt;9.  Give two UNIX kernel parameters that effect an Oracle install&lt;br /&gt;SHMMAX &amp;amp; SHMMNI&lt;br /&gt;10.  Briefly, how do you install Oracle software on UNIX.&lt;br /&gt;Basically, set up disks, kernel parameters, and run orainst.&lt;br /&gt;&lt;br /&gt;1.      To see current user name  Sql&gt; show user;&lt;br /&gt;2.      Change SQL prompt name  SQL&gt; set sqlprompt “Manimara &gt; “ Manimara &gt; Manimara &gt;&lt;br /&gt;3.      Switch to DOS prompt  SQL&gt; host&lt;br /&gt;4.      How do I eliminate the duplicate rows ?  SQL&gt; delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name); or SQL&gt; delete duplicate_values_field_name dv from table_name ta where rowid &lt;(select min(rowid)  from table_name tb where ta.dv=tb.dv); Example. Table Emp Empno Ename 101               Scott 102               Jiyo 103               Millor 104               Jiyo 105               Smith delete ename from emp a where rowid &lt; ( select min(rowid) from emp b where a.ename = b.ename); The output like, Empno Ename 101               Scott 102               Millor 103               Jiyo 104               Smith&lt;br /&gt;5.      How do I display row number with records? To achive this use rownum pseudocolumn with query, like SQL&gt; SQL&gt; select rownum, ename from emp; Output: 1                    Scott 2                    Millor 3                    Jiyo 4                    Smith&lt;br /&gt;6.      Display the records between two range select rownum, empno, ename  from emp  where  rowid in  (select rowid from emp where rownum &lt;=&amp;amp;upto  minus  select rowid from emp where rownum&lt;&amp;amp;Start); Enter value for upto: 10 Enter value for Start: 7&lt;br /&gt;   ROWNUM     EMPNO ENAME --------- --------- ----------         1      7782 CLARK         2      7788 SCOTT         3      7839 KING         4      7844 TURNER&lt;br /&gt;7.      I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable”  want to display, instead of blank space. How do I write the query?&lt;br /&gt; SQL&gt; select nvl(to_char(comm.),'NA') from emp;&lt;br /&gt;Output :&lt;br /&gt;NVL(TO_CHAR(COMM),'NA') ----------------------- NA 300 500 NA 1400 NA NA&lt;br /&gt;8.      Oracle cursor : Implicit &amp;amp; Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements. PL/SQL construct to identify each and every work are used, is called as Cursor. For SQL queries returning a single row, PL/SQL declares all implicit cursors. For queries that returning more than one row, the cursor needs to be explicitly declared.&lt;br /&gt;9.      Explicit Cursor attributes  There are four cursor attributes used in Oracle cursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN&lt;br /&gt;10.  Implicit Cursor attributes  Same as explicit cursor but prefixed by the word SQL&lt;br /&gt;SQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPEN&lt;br /&gt;Tips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements.        : 2.  All are  Boolean attributes.&lt;br /&gt;11.  Find out nth highest salary from emp table  SELECT DISTINCT (a.sal) FROM EMP A WHERE &amp;amp;N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal&lt;=b.sal);&lt;br /&gt;Enter value for n: 2       SAL ---------      3700&lt;br /&gt;12.  To view installed Oracle version information  SQL&gt; select banner from v$version;&lt;br /&gt;13.  Display the number value in Words  SQL&gt; select sal, (to_char(to_date(sal,'j'), 'jsp')) from emp; the output like,&lt;br /&gt;      SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP')) --------- -----------------------------------------------------       800 eight hundred      1600 one thousand six hundred      1250 one thousand two hundred fifty If you want to add some text like, Rs. Three Thousand only. SQL&gt; select sal  "Salary ",  (' Rs. ' (to_char(to_date(sal,'j'), 'Jsp')) ' only.'))  "Sal in Words" from emp / Salary  Sal in Words ------- ------------------------------------------------------     800  Rs. Eight Hundred only.    1600  Rs. One Thousand Six Hundred only.    1250  Rs. One Thousand Two Hundred Fifty only.&lt;br /&gt;14.  Display Odd/ Even number of records  Odd number of records: select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp); 1 3 5 Even number of records: select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp) 2 4 6&lt;br /&gt;15.  Which date function returns number value?  months_between&lt;br /&gt;16.  Any three PL/SQL Exceptions?  Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others&lt;br /&gt;17.  What are PL/SQL Cursor Exceptions?  Cursor_Already_Open, Invalid_Cursor&lt;br /&gt;18.  Other way to replace query result null value with a text  SQL&gt; Set NULL ‘N/A’ to reset SQL&gt; Set NULL ‘’&lt;br /&gt;19.   What are the more common pseudo-columns?  SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM&lt;br /&gt;20.   What is the output of SIGN function?  1 for positive value, 0 for Zero, -1 for Negative value.&lt;br /&gt;21.  What is the maximum number of triggers, can apply to a single table?  12 triggers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Interview Questions for Oracle, DBA, Developer Candidates&lt;br /&gt;PL/SQL Questions:&lt;br /&gt;1. Describe the difference between a procedure, function and anonymous pl/sql block.&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer : Candidate should mention use of DECLARE statement, a function must return a value while a procedure doesn?t have to.&lt;br /&gt;2. What is a mutating table error and how can you get around it?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: This happens with triggers. It occurs because the trigger is trying to update a row it is currently using. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other.&lt;br /&gt;3. Describe the use of %ROWTYPE and %TYPE in PL/SQL&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: %ROWTYPE allows you to associate a variable with an entire table row. The %TYPE associates a variable with a single column type.&lt;br /&gt;4. What packages (if any) has Oracle provided for use by developers?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: Oracle provides the DBMS_ series of packages. There are many which developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL, UTL_FILE. If they can mention a few of these and describe how they used them, even better. If they include the SQL routines provided by Oracle, great, but not really what was asked.&lt;br /&gt;5. Describe the use of PL/SQL tables&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: PL/SQL tables are scalar arrays that can be referenced by a binary integer. They can be used to hold values for use in later queries or calculations. In Oracle 8 they will be able to be of the %ROWTYPE designation, or RECORD.&lt;br /&gt;6. When is a declare statement needed ?&lt;br /&gt;Level: Low&lt;br /&gt;The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alone, non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used.&lt;br /&gt;7. In what order should a open/fetch/loop set of commands in a PL/SQL block be implemented if you use the %NOTFOUND cursor variable in the exit when statement? Why?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: OPEN then FETCH then LOOP followed by the exit when. If not specified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL.&lt;br /&gt;8. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception.&lt;br /&gt;9. How can you find within a PL/SQL block, if a cursor is open?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Use the %ISOPEN cursor status variable.&lt;br /&gt;10. How can you generate debugging output from PL/SQL?&lt;br /&gt;Level:Intermediate to high&lt;br /&gt;Expected answer: Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. The new package UTL_FILE can also be used.&lt;br /&gt;11. What are the types of triggers?&lt;br /&gt;Level:Intermediate to high&lt;br /&gt;Expected Answer: There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key words:&lt;br /&gt;BEFORE ALL ROW INSERT&lt;br /&gt;AFTER ALL ROW INSERT&lt;br /&gt;BEFORE INSERT&lt;br /&gt;AFTER INSERT etc.&lt;br /&gt;DBA:&lt;br /&gt;1. Give one method for transferring a table from one schema to another:&lt;br /&gt;Level:Intermediate&lt;br /&gt;Expected Answer: There are several possible methods, export-import, CREATE TABLE... AS SELECT, or COPY.&lt;br /&gt;2. What is the purpose of the IMPORT option IGNORE? What is it?s default setting?&lt;br /&gt;Level: Low&lt;br /&gt;Expected Answer: The IMPORT IGNORE option tells import to ignore "already exists" errors. If it is not specified the tables that already exist will be skipped. If it is specified, the error is ignored and the tables data will be inserted. The default value is N.&lt;br /&gt;3. You have a rollback segment in a version 7.2 database that has expanded beyond optimal, how can it be restored to optimal?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Use the ALTER TABLESPACE ..... SHRINK command.&lt;br /&gt;4. If the DEFAULT and TEMPORARY tablespace clauses are left out of a CREATE USER command what happens? Is this bad or good? Why?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The user is assigned the SYSTEM tablespace as a default and temporary tablespace. This is bad because it causes user objects and temporary segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper table placement (only data dictionary objects and the system rollback segment should be in SYSTEM).&lt;br /&gt;5. What are some of the Oracle provided packages that DBAs should be aware of?&lt;br /&gt;Level: Intermediate to High&lt;br /&gt;Expected answer: Oracle provides a number of packages in the form of the DBMS_ packages owned by the SYS user. The packages used by DBAs may include: DBMS_SHARED_POOL, DBMS_UTILITY, DBMS_SQL, DBMS_DDL, DBMS_SESSION, DBMS_OUTPUT and DBMS_SNAPSHOT. They may also try to answer with the UTL*.SQL or CAT*.SQL series of SQL procedures. These can be viewed as extra credit but aren?t part of the answer.&lt;br /&gt;6. What happens if the constraint name is left out of a constraint clause?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The Oracle system will use the default name of SYS_Cxxxx where xxxx is a system generated number. This is bad since it makes tracking which table the constraint belongs to or what the constraint does harder.&lt;br /&gt;7. What happens if a tablespace clause is left off of a primary key constraint clause?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: This results in the index that is automatically generated being placed in then users default tablespace. Since this will usually be the same tablespace as the table is being created in, this can cause serious performance problems.&lt;br /&gt;8. What is the proper method for disabling and re-enabling a primary key constraint?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: You use the ALTER TABLE command for both. However, for the enable clause you must specify the USING INDEX and TABLESPACE clause for primary keys.&lt;br /&gt;9. What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The index is created in the user?s default tablespace and all sizing information is lost. Oracle doesn?t store this information as a part of the constraint definition, but only as part of the index definition, when the constraint was disabled the index was dropped and the information is gone.&lt;br /&gt;10. (On UNIX) When should more than one DB writer process be used? How many should be used?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: If the UNIX system being used is capable of asynchronous IO then only one is required, if the system is not capable of asynchronous IO then up to twice the number of disks used by Oracle number of DB writers should be specified by use of the db_writers initialization parameter.&lt;br /&gt;11. You are using hot backup without being in archivelog mode, can you recover in the event of a failure? Why or why not?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: You can?t use hot backup without being in archivelog mode. So no, you couldn?t recover.&lt;br /&gt;12. What causes the "snapshot too old" error? How can this be prevented or mitigated?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: This is caused by large or long running transactions that have either wrapped onto their own rollback space or have had another transaction write on part of their rollback space. This can be prevented or mitigated by breaking the transaction into a set of smaller transactions or increasing the size of the rollback segments and their extents.&lt;br /&gt;13. How can you tell if a database object is invalid?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: By checking the status column of the DBA_, ALL_ or USER_OBJECTS views, depending upon whether you own or only have permission on the view or are using a DBA account.&lt;br /&gt;14. A user is getting an ORA-00942 error yet you know you have granted them permission on the table, what else should you check?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: You need to check that the user has specified the full name of the object (select empid from scott.emp; instead of select empid from emp;) or has a synonym that points to the object (create synonym emp for scott.emp;)&lt;br /&gt;15. A developer is trying to create a view and the database won?t let him. He has the "DEVELOPER" role which has the "CREATE VIEW" system privilege and SELECT grants on the tables he is using, what is the problem?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: You need to verify the developer has direct grants on all tables used in the view. You can?t create a stored object with grants given through views.&lt;br /&gt;16. If you have an example table, what is the best way to get sizing data for the production table implementation?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The best way is to analyze the table and then use the data provided in the DBA_TABLES view to get the average row length and other pertinent data for the calculation. The quick and dirty way is to look at the number of blocks the table is actually using and ratio the number of rows in the table to its number of blocks against the number of expected rows.&lt;br /&gt;17. How can you find out how many users are currently logged into the database? How can you find their operating system id?&lt;br /&gt;Level: high&lt;br /&gt;Expected answer: There are several ways. One is to look at the v$session or v$process views. Another way is to check the current_logins parameter in the v$sysstat view. Another if you are on UNIX is to do a "ps -efgrep oraclewc -l? command, but this only works against a single instance installation.&lt;br /&gt;18. A user selects from a sequence and gets back two values, his select is:&lt;br /&gt;SELECT pk_seq.nextval FROM dual;&lt;br /&gt;What is the problem?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Somehow two values have been inserted into the dual table. This table is a single row, single column table that should only have one value in it.&lt;br /&gt;19. How can you determine if an index needs to be dropped and rebuilt?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Run the ANALYZE INDEX command on the index to validate its structure and then calculate the ratio of LF_BLK_LEN/LF_BLK_LEN+BR_BLK_LEN and if it isn?t near 1.0 (i.e. greater than 0.7 or so) then the index should be rebuilt. Or if the ratio&lt;br /&gt;BR_BLK_LEN/ LF_BLK_LEN+BR_BLK_LEN is nearing 0.3.&lt;br /&gt;SQL/ SQLPlus&lt;br /&gt;1. How can variables be passed to a SQL routine?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: By use of the &amp;amp; symbol. For passing in variables the numbers 1-8 can be used (&amp;amp;1, &amp;amp;2,...,&amp;amp;8) to pass the values after the command into the SQLPLUS session. To be prompted for a specific variable, place the ampersanded variable in the code itself:&lt;br /&gt;"select * from dba_tables where owner=&amp;amp;owner_name;" . Use of double ampersands tells SQLPLUS to resubstitute the value for each subsequent use of the variable, a single ampersand will cause a reprompt for the value unless an ACCEPT statement is used to get the value from the user.&lt;br /&gt;2. You want to include a carriage return/linefeed in your output from a SQL script, how can you do this?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: The best method is to use the CHR() function (CHR(10) is a return/linefeed) and the concatenation function "". Another method, although it is hard to document and isn?t always portable is to use the return/linefeed as a part of a quoted string.&lt;br /&gt;3. How can you call a PL/SQL procedure from SQL?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: By use of the EXECUTE (short form EXEC) command.&lt;br /&gt;4. How do you execute a host operating system command from within SQL?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: By use of the exclamation point "!" (in UNIX and some other OS) or the HOST (HO) command.&lt;br /&gt;5. You want to use SQL to build SQL, what is this called and give an example&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: This is called dynamic SQL. An example would be:&lt;br /&gt;set lines 90 pages 0 termout off feedback off verify off&lt;br /&gt;spool drop_all.sql&lt;br /&gt;select ?drop user ?username? cascade;? from dba_users&lt;br /&gt;where username not in ("SYS?,?SYSTEM?);&lt;br /&gt;spool off&lt;br /&gt;Essentially you are looking to see that they know to include a command (in this case DROP USER...CASCADE;) and that you need to concatenate using the ?? the values selected from the database.&lt;br /&gt;6. What SQLPlus command is used to format output from a select?&lt;br /&gt;Level: low&lt;br /&gt;Expected answer: This is best done with the COLUMN command.&lt;br /&gt;7. You want to group the following set of select returns, what can you group on?&lt;br /&gt;Max(sum_of_cost), min(sum_of_cost), count(item_no), item_no&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The only column that can be grouped on is the "item_no" column, the rest have aggregate functions associated with them.&lt;br /&gt;8. What special Oracle feature allows you to specify how the cost based system treats a SQL statement?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: The COST based system allows the use of HINTs to control the optimizer path selection. If they can give some example hints such as FIRST ROWS, ALL ROWS, USING INDEX, STAR, even better.&lt;br /&gt;9. You want to determine the location of identical rows in a table before attempting to place a unique index on the table, how can this be done?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: Oracle tables always have one guaranteed unique column, the rowid column. If you use a min/max function against your rowid and then select against the proposed primary key you can squeeze out the rowids of the duplicate rows pretty quick. For example:&lt;br /&gt;select rowid from emp e&lt;br /&gt;where e.rowid &gt; (select min(x.rowid)&lt;br /&gt;from emp x&lt;br /&gt;where x.emp_no = e.emp_no);&lt;br /&gt;In the situation where multiple columns make up the proposed key, they must all be used in the where clause.&lt;br /&gt;10. What is a Cartesian product?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: A Cartesian product is the result of an unrestricted join of two or more tables. The result set of a three table Cartesian product will have x * y * z number of rows where x, y, z correspond to the number of rows in each table involved in the join.&lt;br /&gt;11. You are joining a local and a remote table, the network manager complains about the traffic involved, how can you reduce the network traffic?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: Push the processing of the remote data to the remote instance by using a view to pre-select the information for the join. This will result in only the data required for the join being sent across.&lt;br /&gt;12. What is the default ordering of an ORDER BY clause in a SELECT statement?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Ascending&lt;br /&gt;13. What is tkprof and how is it used?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output.&lt;br /&gt;14. What is explain plan and how is it used?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected answer: The EXPLAIN PLAN command is a tool to tune SQL statements. To use it you must have an explain_table generated in the user you are running the explain plan for. This is created using the utlxplan.sql script. Once the explain plan table exists you run the explain plan command giving as its argument the SQL statement to be explained. The explain_plan table is then queried to see the execution plan of the statement. Explain plans can also be run using tkprof.&lt;br /&gt;15. How do you set the number of lines on a page of output? The width?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The SET command in SQLPLUS is used to control the number of lines generated per page and the width of those lines, for example SET PAGESIZE 60 LINESIZE 80 will generate reports that are 60 lines long with a line width of 80 characters. The PAGESIZE and LINESIZE options can be shortened to PAGES and LINES.&lt;br /&gt;16. How do you prevent output from coming to the screen?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The SET option TERMOUT controls output to the screen. Setting TERMOUT OFF turns off screen output. This option can be shortened to TERM.&lt;br /&gt;17. How do you prevent Oracle from giving you informational messages during and after a SQL statement execution?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The SET options FEEDBACK and VERIFY can be set to OFF.&lt;br /&gt;18. How do you generate file output from SQL?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: By use of the SPOOL command&lt;br /&gt;Tuning Questions:&lt;br /&gt;1. A tablespace has a table with 30 extents in it. Is this bad? Why or why not.&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Multiple extents in and of themselves aren?t bad. However if you also have chained rows this can hurt performance.&lt;br /&gt;2. How do you set up tablespaces during an Oracle installation?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments.&lt;br /&gt;3. You see multiple fragments in the SYSTEM tablespace, what should you check first?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Ensure that users don?t have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace assignment by checking the DBA_USERS view.&lt;br /&gt;4. What are some indications that you need to increase the SHARED_POOL_SIZE parameter?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same.&lt;br /&gt;5. What is the general guideline for sizing db_block_size and db_multi_block_read for an application that does many full table scans?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a multiple of 64.&lt;br /&gt;6. What is the fastest query method for a table?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Fetch by rowid&lt;br /&gt;7. Explain the use of TKPROF? What initialization parameter should be turned on to get full TKPROF output?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed_statistics to true in the initialization file and then turning on tracing for either the entire database via the sql_trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output.&lt;br /&gt;8. When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad -How do you correct it?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter.&lt;br /&gt;9. When should you increase copy latches? What parameters control copy latches?&lt;br /&gt;Level: high&lt;br /&gt;Expected answer: When you get excessive contention for the copy latches as shown by the "redo copy" latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the number of CPUs on your system.&lt;br /&gt;10. Where can you get a list of all initialization parameters for your instance? How about an indication if they are default settings or have been changed?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: You can look in the init.ora file for an indication of manually set parameters. For all parameters, their value and whether or not the current value is the default value, look in the v$parameter view.&lt;br /&gt;11. Describe hit ratio as it pertains to the database buffers. What is the difference between instantaneous and cumulative hit ratio and which should be used for tuning?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks. A value greater than 80-90% is good, less could indicate problems. If you simply take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over.&lt;br /&gt;12. Discuss row chaining, how does it happen? How can you reduce it? How do you correct it?&lt;br /&gt;Level: high&lt;br /&gt;Expected answer: Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won?t fit in the remaining block space. This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by export and import of the effected table.&lt;br /&gt;13. When looking at the estat events report you see that you are getting busy buffer waits. Is this bad? How can you find what is causing it?&lt;br /&gt;Level: high&lt;br /&gt;Expected answer: Buffer busy waits could indicate contention in redo, rollback or data blocks. You need to check the v$waitstat view to see what areas are causing the problem. The value of the "count" column tells where the problem is, the "class" column tells you with what. UNDO is rollback segments, DATA is data base buffers.&lt;br /&gt;14. If you see contention for library caches how can you fix it?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Increase the size of the shared pool.&lt;br /&gt;15. If you see statistics that deal with "undo" what are they really talking about?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Rollback segments and associated structures.&lt;br /&gt;16. If a tablespace has a default pctincrease of zero what will this cause (in relationship to the smon process)?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: The SMON process won?t automatically coalesce its free space fragments.&lt;br /&gt;17. If a tablespace shows excessive fragmentation what are some methods to defragment the tablespace? (7.1,7.2 and 7.3 only)&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: In Oracle 7.0 to 7.2 The use of the 'alter session set events 'immediate trace name coalesce level ts#';? command is the easiest way to defragment contiguous free space fragmentation. The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ?alter tablespace coalesce;? is best. If the free space isn?t contiguous then export, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space.&lt;br /&gt;18. How can you tell if a tablespace has excessive fragmentation?&lt;br /&gt;Level: Intermediate&lt;br /&gt;If a select against the dba_free_space table shows that the count of a tablespaces extents is greater than the count of its data files, then it is fragmented.&lt;br /&gt;19. You see the following on a status report:&lt;br /&gt;redo log space requests 23&lt;br /&gt;redo log space wait time 0&lt;br /&gt;Is this something to worry about? What if redo log space wait time is high? How can you fix this?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Since the wait time is zero, no. If the wait time was high it might indicate a need for more or larger redo logs.&lt;br /&gt;20. What can cause a high value for recursive calls? How can this be fixed?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: A high value for recursive calls is cause by improper cursor usage, excessive dynamic space management actions, and or excessive statement re-parses. You need to determine the cause and correct it By either relinking applications to hold cursors, use proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse.&lt;br /&gt;21. If you see a pin hit ratio of less than 0.8 in the estat library cache report is this a problem? If so, how do you fix it?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: This indicate that the shared pool may be too small. Increase the shared pool size.&lt;br /&gt;22. If you see the value for reloads is high in the estat library cache report is this a matter for concern?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Yes, you should strive for zero reloads if possible. If you see excessive reloads then increase the size of the shared pool.&lt;br /&gt;23. You look at the dba_rollback_segs view and see that there is a large number of shrinks and they are of relatively small size, is this a problem? How can it be fixed if it is a problem?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: A large number of small shrinks indicates a need to increase the size of the rollback segment extents. Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the size of the extents and adjust optimal accordingly.&lt;br /&gt;24. You look at the dba_rollback_segs view and see that you have a large number of wraps is this a problem?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: A large number of wraps indicates that your extent size for your rollback segments are probably too small. Increase the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to get the information on transaction size.&lt;br /&gt;25. In a system with an average of 40 concurrent users you get the following from a query on rollback extents:&lt;br /&gt;ROLLBACK CUR EXTENTS&lt;br /&gt;--------------------- --------------------------&lt;br /&gt;R01 11&lt;br /&gt;R02 8&lt;br /&gt;R03 12&lt;br /&gt;R04 9&lt;br /&gt;SYSTEM 4&lt;br /&gt;You have room for each to grow by 20 more extents each. Is there a problem? Should you take any action?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: No there is not a problem. You have 40 extents showing and an average of 40 concurrent users. Since there is plenty of room to grow no action is needed.&lt;br /&gt;26. You see multiple extents in the temporary tablespace. Is this a problem?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: As long as they are all the same size this isn?t a problem. In fact, it can even improve performance since Oracle won?t have to create a new extent when a user needs one.&lt;br /&gt;Installation/Configuration&lt;br /&gt;1. Define OFA.&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: OFA stands for Optimal Flexible Architecture. It is a method of placing directories and files in an Oracle system so that you get the maximum flexibility for future tuning and file placement.&lt;br /&gt;2. How do you set up your tablespace on installation?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The answer here should show an understanding of separation of redo and rollback, data and indexes and isolation os SYSTEM tables from other tables. An example would be to specify that at least 7 disks should be used for an Oracle installation so that you can place SYSTEM tablespace on one, redo logs on two (mirrored redo logs) the TEMPORARY tablespace on another, ROLLBACK tablespace on another and still have two for DATA and INDEXES. They should indicate how they will handle archive logs and exports as well. As long as they have a logical plan for combining or further separation more or less disks can be specified.&lt;br /&gt;3. What should be done prior to installing Oracle (for the OS and the disks)?&lt;br /&gt;Level: Low&lt;br /&gt;Expected Answer: adjust kernel parameters or OS tuning parameters in accordance with installation guide. Be sure enough contiguous disk space is available.&lt;br /&gt;4. You have installed Oracle and you are now setting up the actual instance. You have been waiting an hour for the initialization script to finish, what should you check first to determine if there is a problem?&lt;br /&gt;Level: Intermediate to high&lt;br /&gt;Expected Answer: Check to make sure that the archiver isn?t stuck. If archive logging is turned on during install a large number of logs will be created. This can fill up your archive log destination causing Oracle to stop to wait for more space.&lt;br /&gt;5. When configuring SQLNET on the server what files must be set up?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: INITIALIZATION file, TNSNAMES.ORA file, SQLNET.ORA file&lt;br /&gt;6. When configuring SQLNET on the client what files need to be set up?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: SQLNET.ORA, TNSNAMES.ORA&lt;br /&gt;7. What must be installed with ODBC on the client in order for it to work with Oracle?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: SQLNET and PROTOCOL (for example: TCPIP adapter) layers of the transport programs.&lt;br /&gt;8. You have just started a new instance with a large SGA on a busy existing server. Performance is terrible, what should you check for?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The first thing to check with a large SGA is that it isn?t being swapped out.&lt;br /&gt;9. What OS user should be used for the first part of an Oracle installation (on UNIX)?&lt;br /&gt;Level: low&lt;br /&gt;Expected answer: You must use root first.&lt;br /&gt;10. When should the default values for Oracle initialization parameters be used as is?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Never&lt;br /&gt;11. How many control files should you have? Where should they be located?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: At least 2 on separate disk spindles. Be sure they say on separate disks, not just file systems.&lt;br /&gt;12. How many redo logs should you have and how should they be configured for maximum recoverability?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: You should have at least three groups of two redo logs with the two logs each on a separate disk spindle (mirrored by Oracle). The redo logs should not be on raw devices on UNIX if it can be avoided.&lt;br /&gt;13. You have a simple application with no "hot" tables (i.e. uniform IO and access requirements). How many disks should you have assuming standard layout for SYSTEM, USER, TEMP and ROLLBACK tablespaces?&lt;br /&gt;Expected answer: At least 7, see disk configuration answer above.&lt;br /&gt;Data Modeler:&lt;br /&gt;1. Describe third normal form?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Something like: In third normal form all attributes in an entity are related to the primary key and only to the primary key&lt;br /&gt;2. Is the following statement true or false:&lt;br /&gt;"All relational databases must be in third normal form"&lt;br /&gt;Why or why not?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: False. While 3NF is good for logical design most databases, if they have more than just a few tables, will not perform well using full 3NF. Usually some entities will be denormalized in the logical to physical transfer process.&lt;br /&gt;3. What is an ERD?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: An ERD is an Entity-Relationship-Diagram. It is used to show the entities and relationships for a database logical model.&lt;br /&gt;4. Why are recursive relationships bad? How do you resolve them?&lt;br /&gt;Level: Intermediate&lt;br /&gt;A recursive relationship (one where a table relates to itself) is bad when it is a hard relationship (i.e. neither side is a "may" both are "must") as this can result in it not being possible to put in a top or perhaps a bottom of the table (for example in the EMPLOYEE table you couldn?t put in the PRESIDENT of the company because he has no boss, or the junior janitor because he has no subordinates). These type of relationships are usually resolved by adding a small intersection entity.&lt;br /&gt;5. What does a hard one-to-one relationship mean (one where the relationship on both ends is "must")?&lt;br /&gt;Level: Low to intermediate&lt;br /&gt;Expected answer: This means the two entities should probably be made into one entity.&lt;br /&gt;6. How should a many-to-many relationship be handled?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: By adding an intersection entity table&lt;br /&gt;7. What is an artificial (derived) primary key? When should an artificial (or derived) primary key be used?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: A derived key comes from a sequence. Usually it is used when a concatenated key becomes too cumbersome to use as a foreign key.&lt;br /&gt;8. When should you consider denormalization?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: Whenever performance analysis indicates it would be beneficial to do so without compromising data integrity.&lt;br /&gt;UNIX:&lt;br /&gt;1. How can you determine the space left in a file system?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: There are several commands to do this: du, df, or bdf&lt;br /&gt;2. How can you determine the number of SQLNET users logged in to the UNIX system?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: SQLNET users will show up with a process unique name that begins with oracle, if you do a ps -efgrep oraclewc -l you can get a count of the number of users.&lt;br /&gt;3. What command is used to type files to the screen?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: cat, more, pg&lt;br /&gt;4. What command is used to remove a file?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: rm&lt;br /&gt;5. Can you remove an open file under UNIX?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: yes&lt;br /&gt;6. How do you create a decision tree in a shell script?&lt;br /&gt;Level: intermediate&lt;br /&gt;Expected answer: depending on shell, usually a case-esac or an if-endif or fi structure&lt;br /&gt;7. What is the purpose of the grep command?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: grep is a string search command that parses the specified string from the specified file or files&lt;br /&gt;8. The system has a program that always includes the word nocomp in its name, how can you determine the number of processes that are using this program?&lt;br /&gt;Level: intermediate&lt;br /&gt;Expected answer: ps -efgrep *nocomp*wc -l&lt;br /&gt;9. What is an inode?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: an inode is a file status indicator. It is stored in both disk and memory and tracts file status. There is one inode for each file on the system.&lt;br /&gt;10. The system administrator tells you that the system hasn?t been rebooted in 6 months, should he be proud of this?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: Maybe. Some UNIX systems don?t clean up well after themselves. Inode problems and dead user processes can accumulate causing possible performance and corruption problems. Most UNIX systems should have a scheduled periodic reboot so file systems can be checked and cleaned and dead or zombie processes cleared out.&lt;br /&gt;11. What is redirection and how is it used?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: redirection is the process by which input or output to or from a process is redirected to another process. This can be done using the pipe symbol "", the greater than symbol "&gt;" or the "tee" command. This is one of the strengths of UNIX allowing the output from one command to be redirected directly into the input of another command.&lt;br /&gt;12. How can you find dead processes?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: ps -efgrep zombie -- or -- who -d depending on the system.&lt;br /&gt;13. How can you find all the processes on your system?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Use the ps command&lt;br /&gt;14. How can you find your id on a system?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Use the "who am i" command.&lt;br /&gt;15. What is the finger command?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The finger command uses data in the passwd file to give information on system users.&lt;br /&gt;16. What is the easiest method to create a file on UNIX?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: Use the touch command&lt;br /&gt;17. What does &gt;&gt; do?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: The "&gt;&gt;" redirection symbol appends the output from the command specified into the file specified. The file must already have been created.&lt;br /&gt;18. If you aren?t sure what command does a particular UNIX function what is the best way to determine the command?&lt;br /&gt;Expected answer: The UNIX man -k command will search the man pages for the value specified. Review the results from the command to find the command of interest.&lt;br /&gt;Oracle Troubleshooting:&lt;br /&gt;1. How can you determine if an Oracle instance is up from the operating system level?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: There are several base Oracle processes that will be running on multi-user operating systems, these will be smon, pmon, dbwr and lgwr. Any answer that has them using their operating system process showing feature to check for these is acceptable. For example, on UNIX a ps -efgrep dbwr will show what instances are up.&lt;br /&gt;2. Users from the PC clients are getting messages indicating :&lt;br /&gt;Level: Low&lt;br /&gt;ORA-06114: (Cnct err, can't get err txt. See Servr Msgs &amp;amp; Codes Manual)&lt;br /&gt;What could the problem be?&lt;br /&gt;Expected answer: The instance name is probably incorrect in their connection string.&lt;br /&gt;3. Users from the PC clients are getting the following error stack:&lt;br /&gt;Level: Low&lt;br /&gt;ERROR: ORA-01034: ORACLE not available&lt;br /&gt;ORA-07318: smsget: open error when opening sgadef.dbf file.&lt;br /&gt;HP-UX Error: 2: No such file or directory&lt;br /&gt;What is the probable cause?&lt;br /&gt;Expected answer: The Oracle instance is shutdown that they are trying to access, restart the instance.&lt;br /&gt;4. How can you determine if the SQLNET process is running for SQLNET V1? How about V2?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: For SQLNET V1 check for the existence of the orasrv process. You can use the command "tcpctl status" to get a full status of the V1 TCPIP server, other protocols have similar command formats. For SQLNET V2 check for the presence of the LISTENER process(s) or you can issue the command "lsnrctl status".&lt;br /&gt;5. What file will give you Oracle instance status information? Where is it located?&lt;br /&gt;Level: Low&lt;br /&gt;Expected answer: The alert.ora log. It is located in the directory specified by the background_dump_dest parameter in the v$parameter table.&lt;br /&gt;6. Users aren?t being allowed on the system. The following message is received:&lt;br /&gt;Level: Intermediate&lt;br /&gt;ORA-00257 archiver is stuck. Connect internal only, until freed&lt;br /&gt;What is the problem?&lt;br /&gt;Expected answer: The archive destination is probably full, backup the archive logs and remove them and the archiver will re-start.&lt;br /&gt;7. Where would you look to find out if a redo log was corrupted assuming you are using Oracle mirrored redo logs?&lt;br /&gt;Level: Intermediate&lt;br /&gt;Expected answer: There is no message that comes to the SQLDBA or SRVMGR programs during startup in this situation, you must check the alert.log file for this information.&lt;br /&gt;8. You attempt to add a datafile and get:&lt;br /&gt;Level: Intermediate&lt;br /&gt;ORA-01118: cannot add anymore datafiles: limit of 40 exceeded&lt;br /&gt;What is the problem and how can you fix it?&lt;br /&gt;Expected answer: When the database was created the db_files parameter in the initialization file was set to 40. You can shutdown and reset this to a higher value, up to the value of MAX_DATAFILES as specified at database creation. If the MAX_DATAFILES is set to low, you will have to rebuild the control file to increase it before proceeding.&lt;br /&gt;9. You look at your fragmentation report and see that smon hasn?t coalesced any of you tablespaces, even though you know several have large chunks of contiguous free extents. What is the problem?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: Check the dba_tablespaces view for the value of pct_increase for the tablespaces. If pct_increase is zero, smon will not coalesce their free space.&lt;br /&gt;10. Your users get the following error:&lt;br /&gt;Level: Intermediate&lt;br /&gt;ORA-00055 maximum number of DML locks exceeded&lt;br /&gt;What is the problem and how do you fix it?&lt;br /&gt;Expected answer: The number of DML Locks is set by the initialization parameter DML_LOCKS. If this value is set to low (which it is by default) you will get this error. Increase the value of DML_LOCKS. If you are sure that this is just a temporary problem, you can have them wait and then try again later and the error should clear.&lt;br /&gt;11. You get a call from you backup DBA while you are on vacation. He has corrupted all of the control files while playing with the ALTER DATABASE BACKUP CONTROLFILE command. What do you do?&lt;br /&gt;Level: High&lt;br /&gt;Expected answer: As long as all datafiles are safe and he was successful with the BACKUP controlfile command you can do the following:&lt;br /&gt;CONNECT INTERNAL&lt;br /&gt;STARTUP MOUNT&lt;br /&gt;(Take any read-only tablespaces offline before next step ALTER DATABASE DATAFILE .... OFFLINE;)&lt;br /&gt;RECOVER DATABASE USING BACKUP CONTROLFILE&lt;br /&gt;ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;(bring read-only tablespaces back online)&lt;br /&gt;Shutdown and backup the system, then restart&lt;br /&gt;If they have a recent output file from the ALTER DATABASE BACKUP CONTROL FILE TO TRACE; command, they can use that to recover as well.&lt;br /&gt;If no backup of the control file is available then the following will be required:&lt;br /&gt;CONNECT INTERNAL&lt;br /&gt;STARTUP NOMOUNT&lt;br /&gt;CREATE CONTROL FILE .....;&lt;br /&gt;However, they will need to know all of the datafiles, logfiles, and settings for MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES for the database to use the command.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Which of the following statements is true about implicit cursors?&lt;br /&gt;Implicit cursors are used for SQL statements that are not named.&lt;br /&gt;Developers should use implicit cursors with great care.&lt;br /&gt;Implicit cursors are used in cursor for loops to handle data processing.&lt;br /&gt;Implicit cursors are no longer a feature in Oracle.&lt;br /&gt;Which of the following is not a feature of a cursor FOR loop?&lt;br /&gt;Record type declaration.&lt;br /&gt;Opening and parsing of SQL statements.&lt;br /&gt;Fetches records from cursor.&lt;br /&gt;Requires exit condition to be defined.&lt;br /&gt;A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?&lt;br /&gt;Use employee.lname%type.&lt;br /&gt;Use employee.lname%rowtype.&lt;br /&gt;Look up datatype for EMPLOYEE column on LASTNAME table and use that.&lt;br /&gt;Declare it to be type LONG.&lt;br /&gt;Which three of the following are implicit cursor attributes?&lt;br /&gt;%found&lt;br /&gt;%too_many_rows&lt;br /&gt;%notfound&lt;br /&gt;%rowcount&lt;br /&gt;%rowtype&lt;br /&gt;If left out, which of the following would cause an infinite loop to occur in a simple loop?&lt;br /&gt;LOOP&lt;br /&gt;END LOOP&lt;br /&gt;IF-THEN&lt;br /&gt;EXIT&lt;br /&gt;Which line in the following statement will produce an error?&lt;br /&gt;cursor action_cursor is&lt;br /&gt;select name, rate, action&lt;br /&gt;into action_record&lt;br /&gt;from action_table;&lt;br /&gt;There are no errors in this statement.&lt;br /&gt;The command used to open a CURSOR FOR loop is&lt;br /&gt;open&lt;br /&gt;fetch&lt;br /&gt;parse&lt;br /&gt;None, cursor for loops handle cursor opening implicitly.&lt;br /&gt;What happens when rows are found using a FETCH statement&lt;br /&gt;It causes the cursor to close&lt;br /&gt;It causes the cursor to open&lt;br /&gt;It loads the current row values into variables&lt;br /&gt;It creates the variables to hold the current row values&lt;br /&gt;Read the following code:10.         CREATE OR REPLACE PROCEDURE find_cpt11.         (v_movie_id {Argument Mode} NUMBER, v_cost_per_ticket {argument mode} NUMBER)12.         IS13.         BEGIN14.           IF v_cost_per_ticket  &gt; 8.5 THEN15.         SELECT  cost_per_ticket16.         INTO            v_cost_per_ticket17.         FROM            gross_receipt18.         WHERE   movie_id = v_movie_id;19.           END IF;20.         END;           &lt;br /&gt;Which mode should be used for V_COST_PER_TICKET?&lt;br /&gt;IN&lt;br /&gt;OUT&lt;br /&gt;RETURN&lt;br /&gt;IN OUT&lt;br /&gt;Read the following code:22.         CREATE OR REPLACE TRIGGER update_show_gross23.               {trigger information}24.              BEGIN25.               {additional code}26.              END;           &lt;br /&gt;The trigger code should only execute when the column, COST_PER_TICKET, is greater than $3. Which trigger information will you add?&lt;br /&gt;WHEN (new.cost_per_ticket &gt; 3.75)&lt;br /&gt;WHEN (:new.cost_per_ticket &gt; 3.75&lt;br /&gt;WHERE (new.cost_per_ticket &gt; 3.75)&lt;br /&gt;WHERE (:new.cost_per_ticket &gt; 3.75)&lt;br /&gt;What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?&lt;br /&gt;Only one&lt;br /&gt;All that apply&lt;br /&gt;All referenced&lt;br /&gt;None&lt;br /&gt;For which trigger timing can you reference the NEW and OLD qualifiers?&lt;br /&gt;Statement and Row&lt;br /&gt;Statement only&lt;br /&gt;Row only&lt;br /&gt;Oracle Forms trigger&lt;br /&gt;Read the following code:30.         CREATE OR REPLACE FUNCTION get_budget(v_studio_id IN NUMBER)RETURN number IS&lt;br /&gt;v_yearly_budget NUMBER;&lt;br /&gt;BEGIN&lt;br /&gt;       SELECT  yearly_budget&lt;br /&gt;       INTO            v_yearly_budget&lt;br /&gt;       FROM            studio&lt;br /&gt;       WHERE   id = v_studio_id;&lt;br /&gt;       RETURN v_yearly_budget;&lt;br /&gt;END;&lt;br /&gt;Which set of statements will successfully invoke this function within SQL*Plus?&lt;br /&gt;VARIABLE g_yearly_budget NUMBEREXECUTE g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;VARIABLE g_yearly_budget NUMBEREXECUTE :g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;VARIABLE :g_yearly_budget NUMBEREXECUTE :g_yearly_budget := GET_BUDGET(11);&lt;br /&gt;VARIABLE g_yearly_budget NUMBER:g_yearly_budget := GET_BUDGET(11); 31.         CREATE OR REPLACE PROCEDURE update_theater32.         (v_name IN VARCHAR v_theater_id IN NUMBER) IS33.         BEGIN34.                UPDATE  theater35.                SET             name = v_name36.                WHERE   id = v_theater_id;37.         END update_theater;38.                  &lt;br /&gt;When invoking this procedure, you encounter the error: ORA-000: Unique constraint(SCOTT.THEATER_NAME_UK) violated.&lt;br /&gt;How should you modify the function to handle this error?&lt;br /&gt;An user defined exception must be declared and associated with the error code and handled in the EXCEPTION section.&lt;br /&gt;Handle the error in EXCEPTION section by referencing the error code directly.&lt;br /&gt;Handle the error in the EXCEPTION section by referencing the UNIQUE_ERROR predefined exception.&lt;br /&gt;Check for success by checking the value of SQL%FOUND immediately after the UPDATE statement.&lt;br /&gt;Read the following code:40.         CREATE OR REPLACE PROCEDURE calculate_budget IS41.         v_budget        studio.yearly_budget%TYPE;42.         BEGIN43.                v_budget := get_budget(11);44.                IF v_budget &lt; 3000045.                                        THEN46.                        set_budget(11,30000000);47.                END IF;48.         END;           &lt;br /&gt;You are about to add an argument to CALCULATE_BUDGET. What effect will this have?&lt;br /&gt;The GET_BUDGET function will be marked invalid and must be recompiled before the next execution.&lt;br /&gt;The SET_BUDGET function will be marked invalid and must be recompiled before the next execution.&lt;br /&gt;Only the CALCULATE_BUDGET procedure needs to be recompiled.&lt;br /&gt;All three procedures are marked invalid and must be recompiled.&lt;br /&gt;Which procedure can be used to create a customized error message?&lt;br /&gt;RAISE_ERROR&lt;br /&gt;SQLERRM&lt;br /&gt;RAISE_APPLICATION_ERROR&lt;br /&gt;RAISE_SERVER_ERROR&lt;br /&gt;The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?&lt;br /&gt;ALTER TRIGGER check_theater ENABLE;&lt;br /&gt;ENABLE TRIGGER check_theater;&lt;br /&gt;ALTER TABLE check_theater ENABLE check_theater;&lt;br /&gt;ENABLE check_theater;&lt;br /&gt;Examine this database trigger52.         CREATE OR REPLACE TRIGGER prevent_gross_modification53.         {additional trigger information}54.         BEGIN55.                IF TO_CHAR(sysdate, DY) = MON56.                        THEN57.                        RAISE_APPLICATION_ERROR(-20000,Gross receipts cannot be deleted on Monday);58.                END IF;59.         END;           &lt;br /&gt;This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire DELETE statement. What additional information must you add?&lt;br /&gt;BEFORE DELETE ON gross_receipt&lt;br /&gt;AFTER DELETE ON gross_receipt&lt;br /&gt;BEFORE (gross_receipt DELETE)&lt;br /&gt;FOR EACH ROW DELETED FROM gross_receipt&lt;br /&gt;Examine this function:61.         CREATE OR REPLACE FUNCTION set_budget62.         (v_studio_id IN NUMBER, v_new_budget IN NUMBER) IS63.         BEGIN64.                UPDATE  studio65.                SET             yearly_budget = v_new_budget       WHERE   id = v_studio_id;   &lt;br /&gt;       IF SQL%FOUND THEN&lt;br /&gt;               RETURN TRUEl;&lt;br /&gt;       ELSE&lt;br /&gt;               RETURN FALSE;&lt;br /&gt;       END IF;   &lt;br /&gt;       COMMIT;&lt;br /&gt;END;            &lt;br /&gt;Which code must be added to successfully compile this function?&lt;br /&gt;Add RETURN right before the IS keyword.&lt;br /&gt;Add RETURN number right before the IS keyword.&lt;br /&gt;Add RETURN boolean right after the IS keyword.&lt;br /&gt;Add RETURN boolean right before the IS keyword.&lt;br /&gt;Under which circumstance must you recompile the package body after recompiling the package specification?&lt;br /&gt;Altering the argument list of one of the package constructs&lt;br /&gt;Any change made to one of the package constructs&lt;br /&gt;Any SQL statement change made to one of the package constructs&lt;br /&gt;Removing a local variable from the DECLARE section of one of the package constructs&lt;br /&gt;Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?&lt;br /&gt;When the transaction is committed&lt;br /&gt;During the data manipulation statement&lt;br /&gt;When an Oracle supplied package references the trigger&lt;br /&gt;During a data manipulation statement and when the transaction is committed&lt;br /&gt;Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?&lt;br /&gt;DBMS_DISPLAY&lt;br /&gt;DBMS_OUTPUT&lt;br /&gt;DBMS_LIST&lt;br /&gt;DBMS_DESCRIBE&lt;br /&gt;What occurs if a procedure or function terminates with failure without being handled?&lt;br /&gt;Any DML statements issued by the construct are still pending and can be committed or rolled back.&lt;br /&gt;Any DML statements issued by the construct are committed&lt;br /&gt;Unless a GOTO statement is used to continue processing within the BEGIN section, the construct terminates.&lt;br /&gt;The construct rolls back any DML statements issued and returns the unhandled exception to the calling environment.&lt;br /&gt;Examine this code71.         BEGIN72.                theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;73.         END;           &lt;br /&gt;For this code to be successful, what must be true?&lt;br /&gt;Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist only in the body of the THEATER_PCK package.&lt;br /&gt;Only the GET_TOTAL_FOR_YEAR variable must exist in the specification of the THEATER_PCK package.&lt;br /&gt;Only the V_TOTAL_SEATS_SOLD_OVERALL variable must exist in the specification of the THEATER_PCK package.&lt;br /&gt;Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist in the specification of the THEATER_PCK package.&lt;br /&gt;A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when the function is executed. Which Oracle supplied package will enable this feature?&lt;br /&gt;DBMS_DDL&lt;br /&gt;DBMS_DML&lt;br /&gt;DBMS_SYN&lt;br /&gt;DBMS_SQL&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-2536515328009109692?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/2536515328009109692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=2536515328009109692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/2536515328009109692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/2536515328009109692'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/oracle-full.html' title='oracle full'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-1189098660168501502</id><published>2008-04-28T10:23:00.000-03:00</published><updated>2008-04-28T10:24:47.322-03:00</updated><title type='text'>Frequently aksed asked quetions from oracle</title><content type='html'>Some Questions on Forms 4.5&lt;br /&gt;&lt;br /&gt;1.What are different components in form 4.5 designer ?&lt;br /&gt;2.What is canvas ?&lt;br /&gt;3.Is it possible to move an object from one form to another?&lt;br /&gt;4.What is block menu? Describe its usage.&lt;br /&gt;5.Give usage of following runform options - array = value , block_menu = value , buffer_records,debug,debug_messages,help,interactive,keyin,keyout,logon_screen,optimizeSQL,optimizetp,options_screen,pecs, query_only, quiet,session, statistics, term, window_state&lt;br /&gt;6.What runform option should be used if screen input is to be suppressed and output is to be sent to a file?&lt;br /&gt;7.What is the usage of following forms generate options ? - add_triggers, batch, crt_file, debug, delete, extract, generate_on_upgrate, help, insert, logon, module_access, module_type, nofail, options_screen, output_file, parse, script, statistics, upgrade, upgrade_roles, version, widen_files&lt;br /&gt;8.What is the usage of following forms designer options ? -  color mode,color palette, generate before run,module access, help, module_type,run asysnchronously,print,save before generate, suppress hints,term,use system editor&lt;br /&gt;9.What is user preferences file ?&lt;br /&gt;10.What are various types of  an item ?&lt;br /&gt;11.What functions are used to display an lov programmatically ?&lt;br /&gt;12.Differentiate between content &amp;amp; stacked canvases.&lt;br /&gt;13.What are different type of items in forms 4.5 ? List atlas 5 types. E.g. Text_item&lt;br /&gt;14.List down the file extensions used in forms 4.5 ? E.g. .fmb etc&lt;br /&gt;15.How do you reuse an item across different form modules ?&lt;br /&gt;16.How do you define public &amp;amp; private variables in forms 4.5 ?&lt;br /&gt;17.Can you define a master-detail relationship between two blocks without a foreign key constraint at table level ?&lt;br /&gt;18.How do you define a mandatory column in forms 4.5 ?&lt;br /&gt;19.How can i check for a duplicate key in a block?&lt;br /&gt;20.What is a trigger ?&lt;br /&gt;21.What are the levels at which triggers can be defined?&lt;br /&gt;22.Why triggers are used?&lt;br /&gt;23.What are various trigger groups? Describe functionality of each group.&lt;br /&gt;24.Group&lt;br /&gt;25.Functionality&lt;br /&gt;26.Importance&lt;br /&gt;27.When- triggers&lt;br /&gt;28.Augment default processing&lt;br /&gt;29.High&lt;br /&gt;30.On- triggers&lt;br /&gt;31.Replace default processing&lt;br /&gt;32.Used primarily with non-oracle data sources&lt;br /&gt;33.Pre- and post- triggers        &lt;br /&gt;34.Add processing before or after an event      &lt;br /&gt;35.Better to use navigational triggers&lt;br /&gt;36.Key- triggers                      &lt;br /&gt;37.Change default processing assigned to a specific key&lt;br /&gt;38.Less useful in GUI environments&lt;br /&gt;39.Here the questions like 'what are when-triggers used for? Give examples for when-triggers’ can be asked.&lt;br /&gt;40.Questions depending upon functionality of triggers&lt;br /&gt;41.Function&lt;br /&gt;42.Purpose&lt;br /&gt;43.Example&lt;br /&gt;44.Block processing                &lt;br /&gt;45.Fires in response to record management in a block&lt;br /&gt;46.When-create-record, when_clear_block&lt;br /&gt;47.GUI events             &lt;br /&gt;48.Fires in response to event happening in form interface&lt;br /&gt;49.When-button-pressed, when-timer-expired&lt;br /&gt;50.Master-detail                      &lt;br /&gt;51.Fires during master-detail processing&lt;br /&gt;52.On-check-delete-master&lt;br /&gt;53.Message handling   &lt;br /&gt;54.Fires when an error occurs or message is needed&lt;br /&gt;55.On-error, on-message&lt;br /&gt;56.Navigational           &lt;br /&gt;57.Fires as oracle forms navigates internally through the object hierarchy&lt;br /&gt;58.Fires at the end of a navigational sequence&lt;br /&gt;59.Pre-block, pre-form, post-block,  post-form, when-new-block-instance&lt;br /&gt;60.Query time &lt;br /&gt;61.Fires just before and after an operator executes a query       &lt;br /&gt;62.Pre-query, post-query&lt;br /&gt;63.Here questions like when 'block processing triggers' are fired or which are navigational triggers etc. Can be asked.&lt;br /&gt;64.What is the difference between pre-text-item trigger and on-new-item-instance trigger&lt;br /&gt;65.What are types of triggers?&lt;br /&gt;66.Which legal command can be used in user-defined triggers?&lt;br /&gt;67.What are restricted built-ins? In which type of triggers are these disallowed?&lt;br /&gt;68.While passing parameters to user-defined procedures, what is meant by positional parameter notation?&lt;br /&gt;69.While passing parameters to user-defined procedures, what is meant by positional parameter notation?&lt;br /&gt;70.What is next set?&lt;br /&gt;71.List down atlas 5 system variables. E.g. System.last_record etc&lt;br /&gt;72.How can you assign current date, current time, current date and time to an item ?&lt;br /&gt;73.What are valid values for system Mode ?&lt;br /&gt;74.How can you display only most severe messages while running a form? I.e. How message severity level can be set in a form&lt;br /&gt;75.How can i suppress input of a text item ?&lt;br /&gt;76.How can i add elements to a list item dynamically ?&lt;br /&gt;77.How can i make the width or height of all items on a canvas uniform in forms designer&lt;br /&gt;78.How can i align all items vertically on a canvas at the same time ?&lt;br /&gt;79.What is locking_mode property for a block ? What are different values for it ?&lt;br /&gt;80.How to attach lov to a text item programmatically ?&lt;br /&gt;81.Can record group for a lov changed programmatically ?&lt;br /&gt;82.What are various commit modes used in clear_block ?&lt;br /&gt;83.What is a canvas ?&lt;br /&gt;84.What is a content canvas view ?&lt;br /&gt;85.What is a stacked canvas view ?&lt;br /&gt;86.What will cause the entire contents of a stacked canvas view to be visible ?&lt;br /&gt;87.How can i change the title of my runform window ?&lt;br /&gt;88.How does a display item differ from a normal text item ?&lt;br /&gt;89.Why do a get a null entry in my poplists at startup ?&lt;br /&gt;90.How can i dynamically prevent the user from entering a new record ?&lt;br /&gt;91.How can i dynamically make an entire block query-only at runtime ?&lt;br /&gt;92.How can i change the color and font of an item dynamically at runtime ?&lt;br /&gt;93.How can i have an item which acts like a disabled item , but is not grayed out ?&lt;br /&gt;94.What exactly does 'query hits' and 'query options' mean in  the context of a block ?&lt;br /&gt;95.What is the difference between the block properties of array size and records buffered&lt;br /&gt;96.What should i be using record groups for ?&lt;br /&gt;97.When should i use globals vs parameters ?&lt;br /&gt;98.How do i pass a record group from forms to reports or graphics ?&lt;br /&gt;99.Can i access the contents of a record group within a user exit ?&lt;br /&gt;100.If i want to create a procedure should i use a library, a database stored procedure or a local form procedure ?&lt;br /&gt;101.How does the use of libraries affect the size of the .fmx file ?&lt;br /&gt;102.How should i make a reference to a block in my library program units ?&lt;br /&gt;103.How is SQL within PL/SQL dealt with by forms ?&lt;br /&gt;104.How are the constants like insert_allowed and property_on dealt with by PL/SQL?&lt;br /&gt;105.If a timer expires during a long running query when is it handled ?&lt;br /&gt;106.If a repeat timer expires between a long query, does it repeat prior to being serviced by a when-timer-expired at the end of the query or does it wait for servicing before repeating ?&lt;br /&gt;107.What is the difference between the following triggers :&lt;br /&gt;108.Post-fetch vs. Post_query&lt;br /&gt;109.Post-forms-commit vs. Post-database-commit&lt;br /&gt;110.Pre-query vs. Pre-select&lt;br /&gt;111.Is it possible to defer locking of a record until commit time ?&lt;br /&gt;112.How can i get an image from a file to be stored in my database ?&lt;br /&gt;113.Sometimes when i issue a call_form (.., No_hide) my first form is still hidden.  Why&lt;br /&gt;114.How can i determine which user interface i am using at runtime ?&lt;br /&gt;115.How are menu roles handled in forms 4.5 ?&lt;br /&gt;116.How can i specify my menu items so that they assume up the appropriate position for the GUI ?&lt;br /&gt;117.What is the cause of the message :&lt;br /&gt;118.Frm-10249: no authorization to run application &lt;name&gt;&lt;br /&gt;119.How do i upgrade application form which has referenced objects from library form   forma ?&lt;br /&gt;120.If i have a format mask of dd/mm/yy and type in a date without the slashes, why does this no longer show the correct date ?&lt;br /&gt;121.After upgrading from SQL*forms 3.0 to forms 4.5, why do some of my fields truncate data ?&lt;br /&gt;122.What does the forms45_defaultfont parameter control ?&lt;br /&gt;123.If i upgrade from SQL*forms 2.3 to forms 4.5, what becomes of my v2 style triggers&lt;br /&gt;124.Is the host() command under forms synchronous or asynchronous on windows&lt;br /&gt;125.What gets loaded into memory when you run a form under windows ?&lt;br /&gt;126.Why am i having problems changing the color of a button under windows ?&lt;br /&gt;127.Can forms 4.5 call dll's on ms windows ?&lt;br /&gt;128.Can i improve performance with any motif settings ?&lt;br /&gt;129.How can i disable the blinking cursor to reduce network traffic ?&lt;br /&gt;130.How can i change the look and feel of buttons under motif ?&lt;br /&gt;131.How can i change the font in the trigger text window ?&lt;br /&gt;132.How can you call one form from another?&lt;br /&gt;133.What is the difference between call form, open form and new form?&lt;br /&gt;134.What is the usage of global variables?&lt;br /&gt;135.What is the difference between key_nextitem and post_nextitem?&lt;br /&gt;136.What is validate source?&lt;br /&gt;137.What is populate group query? What it will return?&lt;br /&gt;138.How do you call reports through form?&lt;br /&gt;139.What is reference object?&lt;br /&gt;140.Whether you can change the path of a library?&lt;br /&gt;141.What is new_item_instance?&lt;br /&gt;142.Can you use global variables in record group?&lt;br /&gt;143.What is autoconfirm property of lov?&lt;br /&gt;144.How the errors are shown in forms?&lt;br /&gt;145.What is savepoint?&lt;br /&gt;146.What are property classes?&lt;br /&gt;147.How you attach a form to menu?&lt;br /&gt;148.How can you give parameters?&lt;br /&gt;149.Can we have formula columns without return value?&lt;br /&gt;150.What are visual attributes?&lt;br /&gt;151.Can you change property class and visual attribute at run time?&lt;br /&gt;152.What are the system variables, which can be modified by the user?&lt;br /&gt;153.What can be the value of record status?&lt;br /&gt;154.What is the difference between when_new_item_instance and pre_text_item?&lt;br /&gt;155.How do i populate a poplist with a record group at runtime ?&lt;br /&gt;156.If the first field of a form is required, and i want to tab out without entering any value, how do i do it ?&lt;br /&gt;157.How do i call a backend stored procedure from forms ?&lt;br /&gt;158.How do i handle stored procedure errors from forms ?&lt;br /&gt;159.If i am calling a report from forms &amp;amp; if the report query is 'select * from emp' and dynamically at runtime i want to change it to 'select * from dept' can i do it ? How ?&lt;br /&gt;160.If we have same triggers at multiple levels i.e. Form, block &amp;amp; item then what is the default order of firing of the triggers ?&lt;br /&gt;161.Which trigger gets fired first : when new form instance or when new item instance ?&lt;br /&gt;&lt;br /&gt;Forms  2.3&lt;br /&gt;&lt;br /&gt;1. What are the differences between SQL forms 2.3 , 3.0 &amp;amp; 4.5&lt;br /&gt;2. What are the events with which triggers can be associated&lt;br /&gt;3. What are user exits&lt;br /&gt;4. What was the most complicated form that you worked on&lt;br /&gt;5. What are the different levels in form&lt;br /&gt;6. What are the triggers which are written at form level&lt;br /&gt;7. What is control block&lt;br /&gt;8. What is default form&lt;br /&gt;9. What is page 0. What is it used for&lt;br /&gt;10. What are the attributes which are given to a field&lt;br /&gt;&lt;br /&gt;Frequently asked questions in Apps&lt;br /&gt;&lt;br /&gt;If Interviewer is Indian then he will ask more technical things&lt;br /&gt;1) How to register Form , Reports&lt;br /&gt;2) What happens to the form when u register&lt;br /&gt;3) where u will keep the host source code&lt;br /&gt;4) what is flex field&lt;br /&gt;5) What is segment qualifier&lt;br /&gt;6) what r global segments&lt;br /&gt;8) what r context sensitive segments&lt;br /&gt;10) How to implement Flex fields in forms , name the triggers &amp;amp; user exits&lt;br /&gt;11) why is FND CURRENCY used in reports&lt;br /&gt;12) What is the difference in Quick pick &amp;amp; quick code&lt;br /&gt;13) What is auto reduction&lt;br /&gt;14) What are special triggers created in the form when u register it&lt;br /&gt;15) How will u display message for testing the form u modified&lt;br /&gt;16) How can u see the global parameter values in the form without coding&lt;br /&gt;17) How to debug the form&lt;br /&gt;18) what was the structure of the accounting flexfield in previous project&lt;br /&gt;19) What is balancing segment&lt;br /&gt;20) What is cost center segment&lt;br /&gt;21) Can u have two accounting Flexfields in AR&lt;br /&gt;22) What are on-account sales credits&lt;br /&gt;23) what is customer merging &lt;br /&gt;24) What happens when u complete an invoice&lt;br /&gt;25) What all things are stored in RA_CUSTOMER_TRX&lt;br /&gt;26) What are chargebacks&lt;br /&gt;27) What is lockbox&lt;br /&gt;29) What is address validation&lt;br /&gt;30) What is "Finance Charge"&lt;br /&gt;31) How AR &amp;amp; OE are related&lt;br /&gt;32) What Credit memo / Debit Memo&lt;br /&gt;33) What is the link between CM &amp;amp; invoice ( column name )&lt;br /&gt;34) What is set of books&lt;br /&gt;35) What is address validation&lt;br /&gt;36) how to find overdue invoices&lt;br /&gt;37) What is accounting rule&lt;br /&gt;38)  what is invoicing rule&lt;br /&gt;39) What is auto invoice&lt;br /&gt;40)  List the key flexfields in AR&lt;br /&gt;41)  which is the parameter set to validate keyflexfield value&lt;br /&gt;42)  What is dunning letter&lt;br /&gt;43)  What is profile&lt;br /&gt;44) What is pick release&lt;br /&gt;45) concurrent prg&lt;br /&gt;46) what r the i/p for pick release&lt;br /&gt;47) After which stage  can not cancel the order&lt;br /&gt;48) What is order cycle&lt;br /&gt;49) Name important tables from OE /AR&lt;br /&gt;50) Give the complete process cycle for OE / AR&lt;br /&gt;51) Interface tables in OE/AR&lt;br /&gt;Forms  2.3&lt;br /&gt;1. What are the differences between SQL forms 2.3 , 3.0 &amp;amp; 4.5&lt;br /&gt;2. What are the events with which triggers can be associated&lt;br /&gt;3. What are user exits&lt;br /&gt;4. What was the most complicated form that you worked on&lt;br /&gt;5. What are the different levels in form&lt;br /&gt;6. What are the triggers which are written at form level&lt;br /&gt;7. What is control block&lt;br /&gt;8. What is default form&lt;br /&gt;9. What is page 0. What is it used for&lt;br /&gt;10. What are the attributes which are given to a field&lt;br /&gt;&lt;br /&gt;Frequently asked questions in Apps&lt;br /&gt;&lt;br /&gt;If Interviewer is Indian then he will ask more technical things&lt;br /&gt;1) How to register Form , Reports&lt;br /&gt;2) What happens to the form when u register&lt;br /&gt;3) where u will keep the host source code&lt;br /&gt;4) what is flex field&lt;br /&gt;5) What is segment qualifier&lt;br /&gt;6) what r global segments&lt;br /&gt;8) what r context sensitive segments&lt;br /&gt;10) How to implement Flex fields in forms , name the triggers &amp;amp; user exits&lt;br /&gt;11) why is FND CURRENCY used in reports&lt;br /&gt;12) What is the difference in Quick pick &amp;amp; quick code&lt;br /&gt;13) What is auto reduction&lt;br /&gt;14) What are special triggers created in the form when u register it&lt;br /&gt;15) How will u display message for testing the form u modified&lt;br /&gt;16) How can u see the global parameter values in the form without coding&lt;br /&gt;17) How to debug the form&lt;br /&gt;18) what was the structure of the accounting flex field in previous project&lt;br /&gt;19) What is balancing segment&lt;br /&gt;20) What is cost center segment&lt;br /&gt;21) Can u have two accounting Flexfields in AR&lt;br /&gt;22) What are on-account sales credits&lt;br /&gt;23) what is customer merging &lt;br /&gt;24) What happens when u complete an invoice&lt;br /&gt;25) What all things are stored in RA_CUSTOMER_TRX&lt;br /&gt;26) What are charge backs&lt;br /&gt;27) What is lock box&lt;br /&gt;29) What is address validation&lt;br /&gt;30) What is "Finance Charge"&lt;br /&gt;31) How AR &amp;amp; OE are related&lt;br /&gt;32) What Credit memo / Debit Memo&lt;br /&gt;33) What is the link between CM &amp;amp; invoice ( column name )&lt;br /&gt;34) What is set of books&lt;br /&gt;35) What is address validation&lt;br /&gt;36) how to find overdue invoices&lt;br /&gt;37) What is accounting rule&lt;br /&gt;38)  what is invoicing rule&lt;br /&gt;39) What is auto invoice&lt;br /&gt;40)  List the key flexfields in AR&lt;br /&gt;41)  which is the parameter set to validate keyflexfield value&lt;br /&gt;42)  What is dunning letter&lt;br /&gt;43)  What is profile&lt;br /&gt;44) What is pick release&lt;br /&gt;45) concurrent prg&lt;br /&gt;46) what r the i/p for pick release&lt;br /&gt;47) After which stage  can not cancel the order&lt;br /&gt;48) What is order cycle&lt;br /&gt;49) Name important tables from OE /AR&lt;br /&gt;50) Give the complete process cycle for OE / AR&lt;br /&gt;51) Interface tables in OE/AR&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ORACLE&lt;br /&gt;&lt;br /&gt;1.Difference between oracle 6 and oracle 7&lt;br /&gt;2.Why you call oracle server as a multi threaded processor&lt;br /&gt;3.What is multi threaded architecture&lt;br /&gt;4.What does SGA consists of&lt;br /&gt;5.What does data dictionary contains&lt;br /&gt;6.What does database link contains&lt;br /&gt;7.How can you decide the size of rollback segment&lt;br /&gt;8.What is optimal clause&lt;br /&gt;9.Difference between primary key and unique key&lt;br /&gt;10.Can you truncate a master table with a child table&lt;br /&gt;11.What is the difference between truncate table  and drop table&lt;br /&gt;12.What are the oracle background processes&lt;br /&gt;13.What is  recoverer  process&lt;br /&gt;14.What is two phase commit&lt;br /&gt;15.What is the cluster&lt;br /&gt;16.What are the rowid contents&lt;br /&gt;17.How can you chain the records&lt;br /&gt;18.What is explain plan, Syntax&lt;br /&gt;19.Type of indexes&lt;br /&gt;20.What is shared   pool&lt;br /&gt;21.What is PCTUSED and  INITTRAN&lt;br /&gt;22.Privileges required   to execute  a stored procedure&lt;br /&gt;23.What is checkpoint&lt;br /&gt;24.What are the   roles&lt;br /&gt;25.Can any user take full import/export&lt;br /&gt;26.Can you give a grant on particular column&lt;br /&gt;27.Whether checkpoint process starts on its own? If not, how can you start it?&lt;br /&gt;28.What is SMON&lt;br /&gt;29.What are segment extents and data blocks?&lt;br /&gt;30.How can you refresh a snapshot?&lt;br /&gt;31.Can you update the view?&lt;br /&gt;32.At what levels you can export the data?&lt;br /&gt;33.What is dirty buffer?&lt;br /&gt;34.What is the security mechanism of oracle?&lt;br /&gt;35.What is relational database management system&lt;br /&gt;36.What are physical structures and logical structures in oracle&lt;br /&gt;37.What is the use of each of the structure&lt;br /&gt;38.What is control file ? What are the contents of the control file&lt;br /&gt;39.Which is the parameter of SGA, used  to increase the performance of  the query&lt;br /&gt;40.What is PGA? What are the components of PGA&lt;br /&gt;41.What is oracle instance&lt;br /&gt;42.Which are the background processes which are mandatory for the dedicated server&lt;br /&gt;43.What is multi-threaded architecture&lt;br /&gt;44.What are the processes which are required for multi-threaded architecture&lt;br /&gt;45.What is dedicated server&lt;br /&gt;46.What is the difference between a dedicated server and multi threaded server&lt;br /&gt;47.What are the  contents of the data dictionary&lt;br /&gt;48.What are the three  prefixes attached to a user having similar type of information&lt;br /&gt;49.What is dual table&lt;br /&gt;50.What is the relation between data block, segment, extends&lt;br /&gt;51.What is PCTFREE and PCTUSED&lt;br /&gt;52.What is the format of a data block&lt;br /&gt;53.How the segment is  defined&lt;br /&gt;54.What are different types of segments&lt;br /&gt;55.When the temporary segment  is used&lt;br /&gt;56.What is the use of rollback segment&lt;br /&gt;57.What is the relation between database, tablespace and data file&lt;br /&gt;58.What are the contents of the system tablespace? When it is created&lt;br /&gt;59.What is online and offline tablespace?  When a tablespace is made offline&lt;br /&gt;60.What are the different schema objects&lt;br /&gt;61.What are different type of indexes&lt;br /&gt;62.What is a view&lt;br /&gt;63.What is rowid&lt;br /&gt;64.What are the type of privileges&lt;br /&gt;65.What is the user public&lt;br /&gt;66.What are the predefined roles&lt;br /&gt;67.Who can grant and revoke the role&lt;br /&gt;68.What are the type of failures that can occur&lt;br /&gt;69.What are the structures used for the recovery&lt;br /&gt;70.What are the different  methods of backups&lt;br /&gt;71.What is the relation between data block, segment, extents&lt;br /&gt;72.Which of the following are schema objects - datalinks(n),sysnonyms(y), index(y),&lt;br /&gt;73.table(y), cluster(y),snapshot (y)&lt;br /&gt;74.What is the initialization filename for a database. (initdbname.ora)&lt;br /&gt;75.What are the minimum privileges reqd.&lt;br /&gt;76.What is the difference between a user and a role&lt;br /&gt;77.What is the use of explain plan&lt;br /&gt;78.What is tkprof ?&lt;br /&gt;79.What is SQL trace ?&lt;br /&gt;80.What is the use of analyze statement&lt;br /&gt;81.What is optimization hint&lt;br /&gt;82.What are two optimization approaches&lt;br /&gt;83.Which operations (carried out on a table) change the value of rowid&lt;br /&gt;84.What are the objects that get dropped automatically when a table is dropped&lt;br /&gt;85.How can you delete duplicate rows using rowid&lt;br /&gt;86.What are the parameters to be defined in the configuration file for an instance.&lt;br /&gt;87.What are the parameters to be defined to create new table space&lt;br /&gt;88.What are the steps in creating a database from scratch&lt;br /&gt;89.What is the difference between database triggers and packaged procedures.&lt;br /&gt;90.What is the meaning of the INTERNAL account of the database administrator and where is it used.&lt;br /&gt;91.Which is the configuration file for an instance&lt;br /&gt;92.What are indexes and when should we use them?&lt;br /&gt;93.What is the difference between commit, roll back and savepoint?&lt;br /&gt;94.Which are the types of integrity constraints in oracle?&lt;br /&gt;95.Can you write a single trigger for insert, update and delete?&lt;br /&gt;96.What are type of  joins?&lt;br /&gt;97.What is the difference between a snapshot and a view&lt;br /&gt;98.You need to create a table which is going to have say millions or rows. How do you go about designing it. ? What are the parameters which you can and should control ? ( he expected max extents , pctfree/pctused etc)&lt;br /&gt;99.What are V2 and V3 triggers ? What is the difference.&lt;br /&gt;100.Can you use PL/SQL in V2 triggers ? How,  (if possible)?&lt;br /&gt;101.Have you used tuning ? Explan Plan, Sqltrace, tkprof.&lt;br /&gt;102.What is dirty memory&lt;br /&gt;103.What is cluster index&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PL/SQL&lt;br /&gt;&lt;br /&gt;1.What is %type and %rowtype?&lt;br /&gt;2.What is packaged cursor?&lt;br /&gt;3.In how many ways you can open the cursor?&lt;br /&gt;4.What is block structure of a PL/SQL block?&lt;br /&gt;5.What is exception handler?&lt;br /&gt;6.How to define user defined exception?&lt;br /&gt;7.Is there any general exception?&lt;br /&gt;8.What is a transaction?&lt;br /&gt;9.What are character conversion functions?&lt;br /&gt;10.What type of information you can get from date format?&lt;br /&gt;11.What is decode function?&lt;br /&gt;12.What is PL/SQL table?&lt;br /&gt;13.How the nulls are handled in PL/SQL?&lt;br /&gt;14.What is array size max data parameter?&lt;br /&gt;15.What are bind variables?&lt;br /&gt;16.What is case structure used in PL/SQL?&lt;br /&gt;17.Can you access the variables defined in the package by a function outside the scope of the package?&lt;br /&gt;18.Can you pass parameters to cursor?&lt;br /&gt;19.Can you pass parameters to a procedure?&lt;br /&gt;20.What is a difference between procedure and function?&lt;br /&gt;21.What is the difference between Packages and stored procedures ? Advantages of packages.&lt;br /&gt;22.What is the difference between implicit and explicit cursors?&lt;br /&gt;23.What is record type?&lt;br /&gt;24.Can you use goto statement in PL/SQL?&lt;br /&gt;25.What is the difference between implicit and explicit cursors?&lt;br /&gt;26.What are types of loops?&lt;br /&gt;27.How to compile a stored procedure?&lt;br /&gt;28.What  is the block structure of PL/SQL block&lt;br /&gt;29.How PL/SQL is different than SQL&lt;br /&gt;30.What are scalar type of datatypes&lt;br /&gt;31.What are composit type of data types&lt;br /&gt;32.What is a subtype&lt;br /&gt;33.What is the structure of rowid&lt;br /&gt;34.Whether the rowid of deleted is used for inserting other record&lt;br /&gt;35.Whether you can use rowid in comparison statement in SQL&lt;br /&gt;36.What is implicit data conversion&lt;br /&gt;37.What is explicit data conversion&lt;br /&gt;38.How can you convert a datatype explicitly&lt;br /&gt;39.What are the values which can be  assigned to Boolean variable&lt;br /&gt;40.In how different ways you can assign a value to a variable in PL/SQL&lt;br /&gt;41.Which are the functions, which returns some argument even if null argument is passed ( decode, nvl, replace)&lt;br /&gt;42.What are error reporting functions&lt;br /&gt;43.What is returned by a function userenv&lt;br /&gt;44.What is PL/SQL table&lt;br /&gt;45.Whether a size of the table can be defined at the declaration time&lt;br /&gt;46.What is the  datatype of primary key of a PL SQL table&lt;br /&gt;47.What are the two steps to define a PL/SQL table&lt;br /&gt;48.Can you initialize a PL/SQL table while making the declarations&lt;br /&gt;49.Can you delete the records from PL/SQL table&lt;br /&gt;50.What is a datatype record&lt;br /&gt;51.What are conditional control statement&lt;br /&gt;52.What are iterative constructs&lt;br /&gt;53.Whether the exit statement is written inside the loop or outside the loop&lt;br /&gt;54.What are sequential control statements( goto, null)&lt;br /&gt;55.Whether the null statement passes control to next sequential statement&lt;br /&gt;56.Can you pass a parameter to a cursor. What is the mode of the parameter that can be passed&lt;br /&gt;57.What are the three mandatory operations in cursor management&lt;br /&gt;58.Which the form of the cursor, where theses operations are made automatically&lt;br /&gt;59.What are explicit cursor attributes&lt;br /&gt;60.How cursor attributes can be referenced in case of implicit cursor&lt;br /&gt;61.What is cursor loop . How it is different than other cursor&lt;br /&gt;62.What is an alias ? What is used for?&lt;br /&gt;63.What is database trigger&lt;br /&gt;64.What is the difference between a SQL/forms trigger and a database trigger&lt;br /&gt;65.What is the difference between a stored procedure and a database trigger&lt;br /&gt;66.What are the different type of triggers ( each row, each statement)&lt;br /&gt;67.What is an exception&lt;br /&gt;68.What are the types of exceptions(user defined, predefined)&lt;br /&gt;69.Give 4 predefined exceptions raised&lt;br /&gt;70.How the user defined exceptions are fired&lt;br /&gt;71.What is PRAGMA EXCEPTION_INIT&lt;br /&gt;72.What is the difference between actual parameter and formal parameter&lt;br /&gt;73.What are the different modes of the parameters&lt;br /&gt;74.Can the package variables be referenced in an external stored procedure&lt;br /&gt;75.How to implement user-defined exceptions&lt;br /&gt;76.In how different ways you can assign a value to a variable in PL/SQL&lt;br /&gt;77.What is the  datatype of primary key of a PL SQL table&lt;br /&gt;78.Can you initialize a PL/SQL table while making the declarations&lt;br /&gt;79.What are conditional control statement&lt;br /&gt;80.For which SQL statements is the implicit cursor opened.&lt;br /&gt;81.Which is the form of the cursor, where these operations are made automatically&lt;br /&gt;82.How cursor attributes can be referenced in case of implicit cursor&lt;br /&gt;83.What are the types of exceptions(user defined, redefined)&lt;br /&gt;84.How the user defined exceptions are fired&lt;br /&gt;85.What is the block structure of PL/SQL block&lt;br /&gt;86.Will 'before delete trigger' get fired if table is truncated.&lt;br /&gt;87.What are the different modes of the parameters&lt;br /&gt;88.Can we trap all the triggering events in a single trigger.&lt;br /&gt;89.What are different types of loop constraints in PL/SQL?&lt;br /&gt;&lt;br /&gt;SQL&lt;br /&gt;&lt;br /&gt;1.What is SQL&lt;br /&gt;2.What are the different type SQL statements( ddl. Dml, dcl, transaction control)&lt;br /&gt;3.When does rowid change&lt;br /&gt;4.What are synonyms&lt;br /&gt;5.What is the difference between delete table and truncate table&lt;br /&gt;6.What is &amp;amp; and &amp;amp;&amp;amp; operators?&lt;br /&gt;7.When the having clause is used&lt;br /&gt;8.What is the difference between where clause and having clause&lt;br /&gt;9.Is it mandatory to have a group by clause if, having exists&lt;br /&gt;10.What are different date format models&lt;br /&gt;11.How the data is stored in the database&lt;br /&gt;12.What are set operators&lt;br /&gt;13.What are row operators (distinct, all)&lt;br /&gt;14.What is like, in and between operators&lt;br /&gt;15.What is the information used to define  a column in the table&lt;br /&gt;16.What are diff dml statements&lt;br /&gt;17.What is the use of dynamic SQL statement prepare and execute&lt;br /&gt;18.What is the difference between a simple join and a outer join&lt;br /&gt;19.What is minextends and maxextends&lt;br /&gt;20.What are ttitle and btitle clauses&lt;br /&gt;21.What is serveroutput setting&lt;br /&gt;22.How to insert (') single quote as a value&lt;br /&gt;23.Char datatype can be converted to how many types&lt;br /&gt;24.What is instr function&lt;br /&gt;25.How can a SQL script be executed automatically as soon as SQLplus is invoked&lt;br /&gt;26.How to implement the break logic reports&lt;br /&gt;27.What is the maximum no of chars a accept statement can acquire&lt;br /&gt;28.How you specify column separators?&lt;br /&gt;29.What is tabs table?&lt;br /&gt;30.What is the max. length for variable name and value to be stored in it&lt;br /&gt;31.What is the restriction on usage of &amp;amp; and &amp;amp;&amp;amp; operators&lt;br /&gt;32.How we display the generate timing data for SQL commands&lt;br /&gt;33.With set autocommit on command, a PL/SQL block having multiple insert, update or delete statements is executed. Now if the script aborts in between, will all the changes be committed or none at all ?&lt;br /&gt;34.What are the uid and user functions&lt;br /&gt;35.What does the set escape command does&lt;br /&gt;36.How to execute operating system commands from SQL plus&lt;br /&gt;37.How we return a value while exiting the SQLplus&lt;br /&gt;38.How to disable some roles for users (hint : product_user_profile)&lt;br /&gt;39.What are the new values&lt;br /&gt;40.What are the pseudocolumns&lt;br /&gt;41.Which are the functions, which returns some argument even if null argument is passed ( decode, nvl, replace)&lt;br /&gt;42.What are different date format models? Hoe the data stored in the database&lt;br /&gt;43.How can we define a column in the table with all options&lt;br /&gt;44.Give the usage of 'for - update'.&lt;br /&gt;45.What is the difference between delete table and truncate table&lt;br /&gt;46.Can we define a descending sequence&lt;br /&gt;47.Whether the rowid of deleted is used for inserting other record&lt;br /&gt;48.What is mutating table&lt;br /&gt;49.What are synonyms&lt;br /&gt;50.What are the new values&lt;br /&gt;51.Give the usage of compute statement&lt;br /&gt;52.What is SQL.pno&lt;br /&gt;53.What are the following set operators used for - heading ,page,pagesize,feedback&lt;br /&gt;54.What are ttitle and btitle clauses&lt;br /&gt;55.What is serveroutput setting&lt;br /&gt;56.In a column clause what are the options used for formatting&lt;br /&gt;57.How we display the generate timing data for SQL commands&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ORACLE UTILITIES&lt;br /&gt;&lt;br /&gt;1.Which is the import/export privilege required&lt;br /&gt;2.What is data export&lt;br /&gt;3.What are different modes of import/export&lt;br /&gt;4.What are the three ways to export data&lt;br /&gt;5.What is the inctype parameter means&lt;br /&gt;6.What is the order of  data import&lt;br /&gt;7.How do U importing snapshots&lt;br /&gt;8.What are the three ways to export data&lt;br /&gt;9.What is the inctype parameter means&lt;br /&gt;10.What is the usage of parfile in export/import&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL-LOADER&lt;br /&gt;&lt;br /&gt;1.What is SQL load&lt;br /&gt;2.What are the files which are used in SQL*Loader?&lt;br /&gt;3.What is delimiter&lt;br /&gt;4.Can you load data in multiple tables&lt;br /&gt;5.Can you filter data  while loading&lt;br /&gt;6.What is a bad record, rejected record and discarded record&lt;br /&gt;7.What are the contents of the control file&lt;br /&gt;8.What are the data paths used for loading&lt;br /&gt;9.What is conventional path method&lt;br /&gt;10.What is direct path method? State the disadvantages of the direct path&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;REPORTS 2.5&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.Can you have an or condition when you are linking 2 queries ? E.g. Query  1- deptno,ename,sal - query 2- salgrade,hisal,losal&lt;br /&gt;2.If you then specified a link between sal and hisal, then another link between sal and losal this presumably would setup the report to show:&lt;br /&gt;3.Where sal &gt;= losal and sal &lt;= hisal&lt;br /&gt;4.But if you really wanted a report to show:&lt;br /&gt;5.Where sal &lt;= losal or sal &gt;= hisal&lt;br /&gt;6.You just can't change the signs around otherwise you would get:&lt;br /&gt;7.Where sal &lt;= losal and sal &gt;= hisal&lt;br /&gt;8.Which would return zero rows.&lt;br /&gt;9.Can this be done ?&lt;br /&gt;10.When i create a link between queries, does the link have to be an equi-join ?&lt;br /&gt;11.What are the differences between lexical and bind parameters&lt;br /&gt;12.What is a 'break group' and how do you create one ?&lt;br /&gt;13.What is the difference in using a group filter vs maximum rows?&lt;br /&gt;14.I have a report with approx. 16 queries.  Each query is contained in it's own group frame in the layout.  When i run the report, each group after the first page starts printing half way down the page. How do i fix this ?&lt;br /&gt;15.Is there an easy way to have the odd page numbers appear on the right side of the report page and the even page numbers to appear on the left side of the report page so when you put the pages together like a book they will appear on the correct side ?&lt;br /&gt;16.When doing a master detail report, the default layout creates a layout where the detail group is below and to the right of the master group.&lt;br /&gt;17.Is there a setting i can change so that the detail objects are offset just a little bit to the right of the master group?  We have a lot of reports with 4 or 5 deep master/details and currently have to move them all back manually ?&lt;br /&gt;18.Can the cells of a matrix contain a dynamic number of values, so that the vertical/horizontal size of the cell is determined at runtime according to the number of values corresponding to this cell (of course the corresponding group with print direction down/across would also have to expand vertically/horizontally)?&lt;br /&gt;19.Is there a way to change the same format mask in a lot of fields in one step?&lt;br /&gt;20.What is a "printable area" and how can i view it? ?&lt;br /&gt;21.The response time when making a change or moving an object in the layout editor is very slow.  What can i do to improve performance?&lt;br /&gt;22.Is it possible from the layout editor to see implicit anchors?&lt;br /&gt;23.When exactly does the before report trigger fire?&lt;br /&gt;24.Will the before report trigger be the first trigger fired?  It appears so from the order the triggers are listed in the object navigator?&lt;br /&gt;25.Does reports 2.5 support the concept of timers, like graphics?  If so how?  Would this be a function of the operating system batch process only?&lt;br /&gt;26.What are the "tradeoffs" of using attached libraries vs local PL/SQL ?&lt;br /&gt;27.Many of my program units are very SQL intensive.  Would i get better performance if they resided on the server or client&lt;br /&gt;28.How can i create an ASCII output file with oracle reports?&lt;br /&gt;29.Can oracle reports2.5 actually pass Information to and/or create bar codes?  If so how?   If not,is a third party tool available that works in conjunction with reports2.5? (e.g.. For medical id bracelets)?&lt;br /&gt;30.Can reports2.5 be used to create tape file format type reports (with header records, detail records, trailer records)&lt;br /&gt;31.Is there any conversion utility that can be used to migrate from SQL*report(rpt) to oracle reports?&lt;br /&gt;32.Is it possible to upgrade directly from SQL*reportwriter 1.1 to reports 2.5 ?&lt;br /&gt;33.On windows during the same session if i print several reports from oracle forms each time r20run.exe is started.  Is it possible to keep r20run.exe in memory similar to oracle graphics batch engine ?&lt;br /&gt;34.What oracle.ini parameter is used on windows to search for any external files used by my report (e.g. Rdf/rep files,.SQL,.lib or image files) ?&lt;br /&gt;35.What oracle.ini parameter is used on windows to redirect where temporary files are created ?&lt;br /&gt;36.What type of ole2 support does reports 2.5 have ?&lt;br /&gt;37.Must a run_product call always be handled by the reports server on ms-windows ?&lt;br /&gt;38.How can i create an ASCII report that will print landscape?&lt;br /&gt;39.Is pcl5 supported in reports 2.5? If not, when will it be supported?&lt;br /&gt;40.Recently i had a customer asking about out postscript capabilities. They questions are:&lt;br /&gt;41.If we generate postscript code ?&lt;br /&gt;42.Using the wysiwyg editor, does the report print to a postscript printer exactly the way it looks on the screen?&lt;br /&gt;43.Why don't i see the reports progress dialog box when a run_product to reports is issued from forms?&lt;br /&gt;44.Why when calling a report from forms do you still get the parameter form with a destype=screen when the report was designed with a default value of destype=printer ?&lt;br /&gt;45.Why does my embedded graphics display sometimes look unreadable ? It appears to have shrunken the size of the display to point where for the user it is unreadable.&lt;br /&gt;46.How does one pass parameters (e.g. Data ranges) to reports2.5 running in batch mode?&lt;br /&gt;47.Other than the database limits, does reports.5 have any type of query limits?  I know about what the database can do and the operating systems specific things.&lt;br /&gt;48.What guidelines are out there for setting up batch processing of reports so that it can be as operating system independent as possible?  We need the ability, if desired, to move the application/batch processing from rs6000 aix to mvs and back!!&lt;br /&gt;49.Are there any facilities to restart a report that was stopped in the middle of processing for whatever reason?&lt;br /&gt;50.Is there anyway to programmatically disable the print button in the previewer?&lt;br /&gt;51.Is it possible to at runtime programmatically maximize the previewer window and determine the x/y coordinates?&lt;br /&gt;52.Is there any way in reports 2.0 or 2.5 to trap all errors in order to display your own error message, similar to the on-error and on-message triggers in forms ?&lt;br /&gt;53.Do i need to install the product specific tables for reports ?&lt;br /&gt;54.What are placeholder columns in report?&lt;br /&gt;55.How do you print a character mode report?&lt;br /&gt;56.In a break report how can you shift to next page in the same value?&lt;br /&gt;57.Can you have dynamic report query? If yes, how?&lt;br /&gt;58.How can you print in bold or compressed fashion?&lt;br /&gt;59.What are SRW packages?&lt;br /&gt;60.Can you include a PL/SQL block in another PL/SQL block.&lt;br /&gt;61.How do suppress index using in a where clause&lt;br /&gt;62.How do you get the sources of database processes&lt;br /&gt;63.What are the pros and cons of basing a base table on a view rather than on a base table&lt;br /&gt;64.What are triggers&lt;br /&gt;65.What is a host array&lt;br /&gt;66.What is an indicator variable.&lt;br /&gt;67.What is dynamic SQL&lt;br /&gt;68.When should one use and not use indexes&lt;br /&gt;69.How do you develop a master detail report&lt;br /&gt;70.What are the advantages of reports 2.0 over pro*c&lt;br /&gt;71.What are the disadvantages of reports 2.0 over pro*c&lt;br /&gt;72.Which is the most complex report that you have used.&lt;br /&gt;73.What is anchoring ?&lt;br /&gt;74.What are format triggers ?&lt;br /&gt;75.What is a user exit ?&lt;br /&gt;76.How can you increase the performance of reports ?&lt;br /&gt;77.How you print a break report?&lt;br /&gt;78.How do I call reports from forms ?&lt;br /&gt;79.What are the various parameters of run_product built-in ?&lt;br /&gt;80.What are lexical parameters ?&lt;br /&gt;81.What is a complex report that you have done ?&lt;br /&gt;82.What are the prerequisites of a matrix report ?&lt;br /&gt;83.Can you call report from report? How if yes? If No Why?&lt;br /&gt;84.How do you go about optimizing report? What all is required to be done?&lt;br /&gt;&lt;br /&gt;If u are showing experience on paper in APPS then u may have to list&lt;br /&gt; the modifications in the report , forms &amp;amp; justify the same&lt;br /&gt;&lt;br /&gt;1. Differences between OraFin 10.5 and 10.6 ?&lt;br /&gt;(a) What are the differen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-1189098660168501502?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/1189098660168501502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=1189098660168501502' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/1189098660168501502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/1189098660168501502'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/frequently-aksed-asked-quetions-from.html' title='Frequently aksed asked quetions from oracle'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-4259872614523638649</id><published>2008-04-28T10:21:00.000-03:00</published><updated>2008-04-28T10:22:28.795-03:00</updated><title type='text'>forms and reports</title><content type='html'>1. What is Oracle Forms and what is it used for?&lt;br /&gt;Oracle Forms is a 4GL Rapid Application Development (RAD) environment. Forms Builder is used to create applications to enter, access, change, or delete data from Oracle (and other) databases. The Forms Runtime environment is required to execute compiled Forms modules. Forms can also be deployed across the Web using the Oracle Internet Application Server (iAS) Forms Services.&lt;br /&gt;Oracle Forms is part of the Oracle Internet Developer Suite (iDS). It was previously called SQL*Forms.&lt;br /&gt;2. Can an Forms FMX be moved from one operating system to another?&lt;br /&gt;FMX files are operating system dependent. On the other hand, FMB's are not. So, you have to regenerate them when ever you change the operating system or the Forms version.&lt;br /&gt;3. How does one iterate through items and records in a specified block?&lt;br /&gt;One can use NEXT_FIELD to iterate (loop) through items in a specific block and NEXT_RECORD to iterate through records in a block. Code example:                OriPos := TO_NUMBER(:System.Trigger_Record);               First_Record;               LOOP                 --   do processing                 IF (:System.Last_Record = 'TRUE') THEN                    Go_Record(OriPos);                    EXIT;                 ELSE                    Next_Record;                 END IF;               END LOOP&lt;br /&gt;4. Can on bypass the Oracle login screen?&lt;br /&gt;The first thing that the user sees when using runform is the Oracle logon prompt asking them for their username, password, and database to connect to. You can bypass this screen or customise it by displaying your own logon screen. Eg:                ON-LOGIN                declare                   uname varchar2(10);                   pass  varchar2(10);               begin                   uname := 'username';                   pass  :='password';                   logon(uname, pass'@connect_database');               end;&lt;br /&gt;5. Can one Maximize/ Minimize a Window in Forms?&lt;br /&gt;On MS-Windows, Forms run inside a Windows Multiple-Document Interface (MDI) window. You can use SET_WINDOW_PROPERTY on the window called FORMS_MDI_WINDOW to resize this MDI (or any other named) window. Examples:         set_window_property(FORMS_MDI_WINDOW,WINDOW_STATE, MINIMIZE);        set_window_property(FORMS_MDI_WINDOW, POSITION, 7, 15);        set_window_property('my_window_name', WINDOW_STATE, MAXIMIZE);&lt;br /&gt;6. How does one suppress or customize error messages in Forms?&lt;br /&gt;One can either set the message level using the system variable SYSTEM.MESSAGE_LEVEL or trap the errors using the ON-ERROR or ON-MESSAGE triggers.&lt;br /&gt;7. Can one issue DDL statements from Forms?&lt;br /&gt;DDL (Data Definition Language) commands like CREATE, DROP and ALTER are not directly supported from Forms because your Forms are not suppose to manipulate the database structure.&lt;br /&gt;A statement like CREATE TABLE X (A DATE); will result in error:&lt;br /&gt;Encountered the symbol "CREATE" which is a reserved word.&lt;br /&gt;However, you can use the FORMS_DDL built-in to execute DDL statements. Eg:&lt;br /&gt;FORMS_DDL('CREATE TABLE X (A DATE)');&lt;br /&gt;FORMS_DDL can also be used to create dynamic SQL statements at runtime. The FORMS_SUCCESS built-in can be used to determine if the last executed built-in was successful.&lt;br /&gt;8. Can one execute dynamic SQL from Forms?&lt;br /&gt;Yes, use the FORMS_DDL built-in or call the DBMS_SQL database package from Forms. Eg: FORMS_DDL('INSERT INTO X VALUES ('  col_list  ')');&lt;br /&gt;Just note that FORMS_DDL will force an implicit COMMIT and may de-synchronize the Oracle Forms COMMIT mechanism.&lt;br /&gt;9. Forms won't allow me to use restricted built-in's. What should I do?&lt;br /&gt;How to get around the "can't use a restricted built-in in built-in XXX" message:&lt;br /&gt;1. Create a TIMER at the point where you want the navigation to occur.&lt;br /&gt;Eg. create_timer('TIMER_X', 5, NO_REPEAT);&lt;br /&gt;2. Code a WHEN-TIMER-EXPIRED trigger to handle the navigation                DECLARE                 tm_name  VARCHAR2(20);               BEGIN                 tm_name  := Get_Application_Property(TIMER_NAME);                 IF tm_name = 'TIMER_X' THEN                   Go_Item('ITEM_X');                 END IF;               END;Dirty but effective (didn't Oracle promise to fix this feature?).&lt;br /&gt;10. Can one change the mouse pointer in Forms?&lt;br /&gt;The SET_APPLICATION_PROPERTY build-in in Oracle Forms allow one to change the mouse pointer. The following cursor styles are supported: DEFAULT, BUSY, HELP, INSERTION and CROSSHAIR.&lt;br /&gt;Eg: SET_APPLICATION_PROPERTY(CURSOR_STYLE, BUSY);&lt;br /&gt;11. Why doesn't my messages show on the screen?&lt;br /&gt;Regardless of whether you call the MESSAGE() built-in with ACKNOWLEDGE, NO_ACKNOWLEDGE, or with no mode specification at all, your message may or may not be displayed. This is because messages are displayed asynchronously. To display messages immediately, use the SYNCHRONIZE build-in:&lt;br /&gt;message('...'); synchronize;&lt;br /&gt;This can also be used to execute a query while the user is looking at the results of a previous query.&lt;br /&gt;12. What happened to SQL*Menu?&lt;br /&gt;From Forms V4.5, SQL*Menu is fully integrated into Oracle Forms. Application menus can be added to your application by creating Menu Modules (*.MMB) and generate it to Menu Module Executables (*.MMX).&lt;br /&gt;13. How does one create a custom toolbar?&lt;br /&gt;Create a new block, let's name it "TOOLBAR" and a canvas named "C_TOOLBAR" (for ilustration purposes). Put some iconic buttons on your canvas. Use the following properties for these buttons:&lt;br /&gt;  Enabled: True&lt;br /&gt;  Navigable: False&lt;br /&gt;  Mouse Navigate: False&lt;br /&gt;Now set the "Canvas Type" in the canvas property palette to "Horizontal Toolbar" and the "Form Horizontal Toolbar Canvas" in the module property palette to your canvas name (C_TOOLBAR in our case).&lt;br /&gt;14. How does one compile MS Help files?&lt;br /&gt;The Microsoft Help Compiler does not ship with Designer/2000 or Developer/2000, but you can download it from here:&lt;br /&gt;&lt;a href="http://www.u-net.com/eon/easyhelp/hcpsites.htm"&gt;Help Compiler - FTP Sites&lt;/a&gt;&lt;br /&gt;Note: Designer/2000 includes a Help Generator that can generate source files for the Help Compiler.&lt;br /&gt;15. How can I read/write OS Files from Forms?&lt;br /&gt;OS files can be read/written from Forms using the TEXT_IO package in Forms. The TEXT_IO package has a datatype FILE_HANDLE. It also has procedures FCLOSE, GET_LINE, NEW_LINE, PUT, PUT_LINE &amp;amp; PUTF and a function FOPEN. Example:         DECLARE           file1  TEXT_IO.FILE_TYPE;           file2  TEXT_IO.FILE_TYPE;           str    VARCHAR2(80);        BEGIN=           file1 := TEXT_IO.FOPEN( 'input.txt','r' );           file2 := TEXT_IO.FOPEN( 'output.txt', 'w' );           TEXT_IO.GET_LINE( file1, str );           TEXT_IO.PUT_LINE( file2, str );           TEXT_IO.FCLOSE( file1 );           TEXT_IO.FCLOSE( file2 );        END;&lt;br /&gt;16. How can I generate all my forms in a batch?&lt;br /&gt;Look at this DOS Batch file example:                @echo off               @echo. +----------------------------------------------------------               @echo.  FMXGNALL.BAT               @echo. +----------------------------------------------------------               @echo.                @echo.  Create runtime FMXs from source FMBs               @echo.  Will convert ALL of the fmbs in the current direcotry               @echo.  Usage : FMXALL.BAT username/password@connect string               @echo.                @echo. +----------------------------------------------------------               @echo.               @echo. Username/Password@connect_string = %1               @echo.                              IF %1 == "" GOTO END                              @echo Removing old FMX files               del *.fmx                @echo Creating the new FMX files               rem Change f45gen32 to f45gen if in 16 bit environment.               FOR %%F in (*.fmb) DO start /w f45gen32 userid=%1 batch=y                                               module=%%F                              @echo.               @echo Done!!! Remember to move the FMX files into your runtime                                               directory.               @echo.                              :END&lt;br /&gt;17. How does one get a form to run on Unix?&lt;br /&gt;You need to design your form on your workstation. FTP or copy the Forms's FMB file to the Unix box. If you generate for a terminal environment (character based),&lt;br /&gt;the syntax is:    f45gen USERID=userid/passwd@db_name MODULE_TYPE=FORM MODULE=module_name&lt;br /&gt;If you want to generate a Library file, replace FORM with LIBRARY. Use f45genm to generate your form in a Motif environment. Use the "f45run" command to run your form.&lt;br /&gt;Why do terminal users hate Forms?&lt;br /&gt;Most Unix, MVS and VMS users do not like Forms 4.5/ 5.0/ 6.0 for a couple of reasons:&lt;br /&gt;You need to design on a PC and frequently get compatibility problems (font scaling, etc);&lt;br /&gt;Forms 4.5 is no improvement for Forms 3.0 terminal users at all, rather it is a step backwards;&lt;br /&gt;Forms 4.5 uses too much memory and executables are about 400% larger than for its 3.0 counter part;&lt;br /&gt;The largest Oracle Forms customers still runs on Forms V3.0 and will rather throw out Oracle than to convert to Forms 4.5.&lt;br /&gt;I think Oracle should bring SQL*Forms v3.0 back for terminal users. They could rename the product to Oracle Forms for Terminals, or something.&lt;br /&gt;Oracle Forms and Reports Services FAQ&lt;br /&gt;1. What is Forms and Reports Services?&lt;br /&gt;Oracle Forms and Reports Services is a component of the Oracle &lt;a href="http://www.orafaq.com/navweb.htm"&gt;Internet Application Server&lt;/a&gt; (9iAS) that enables programmers to deploy &lt;a href="http://www.orafaq.com/faqfrm6i.htm"&gt;Oracle Forms&lt;/a&gt; and &lt;a href="http://www.orafaq.com/faqrep.htm"&gt;Oracle Reports&lt;/a&gt; across the Web. Forms and Reports services as previously known as WebForms and WebReports. Some people also refer to it as the Forms and Reports Server.&lt;br /&gt;With Oracle's Forms and Reports Services one can web-enable existing Oracle Developer (Forms and Reports) applications without changing any application code.&lt;br /&gt;WebForms consist of a Forms client (downloadable Java applet) and FormsServer (Java NCA Cartridge). WebForms can be centrally deployed and managed and provides a nice thin client implementation.&lt;br /&gt;2. What Web Servers can be used with the Forms and Reports Services?&lt;br /&gt;The Oracle HTTP Server (Apache Web server) is installed with the Forms and Reports Services. However, any web server that supports CGI (Common Gateway Interfaces) can be used.&lt;br /&gt;3. How does one start and stop the Forms and Reports Services?&lt;br /&gt;Please note that the Forms Services will be running directly after installing the product. Use the following command to start and stop the Forms Services:                 $ORACLE_HOME/6iserver/forms60_server start                $ORACLE_HOME/6iserver/forms60_server stop&lt;br /&gt;Test if the Forms server is running by navigating to the following URL: http://host_name:port/dev60html/runform.htm. Change host_name and port to the server where you HTTP server is running. the&lt;br /&gt;4. How does one deploy a Form on the Web?&lt;br /&gt;Follow these steps to deploy a Form on the Web:&lt;br /&gt;Copy or FTP the Form's FMB file to the server where the Forms Services are running.&lt;br /&gt;Re-compile the Form to a FMX&lt;br /&gt;Etc...&lt;br /&gt;Forms 4.5 Questions&lt;br /&gt;&lt;br /&gt;1) which system variables can be set by users?&lt;br /&gt;1) SYSTEM.MESSAGE_LEVEL&lt;br /&gt;SYSTEM.DATE_THRESHOLD&lt;br /&gt;SYSTEM.EFFECTIVE_DATE&lt;br /&gt;SYSTEM.SUPPRESS_WORKING&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Can you store objects in library?&lt;br /&gt;2) Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object.&lt;br /&gt;&lt;br /&gt;3) Is forms 4.5 object oriented tool and why?&lt;br /&gt;3) Yes, partially. 1) PROPERTY CLASS - inheritance property&lt;br /&gt;                            2) OVERLOADING : procedures and functions.&lt;br /&gt;&lt;br /&gt;4) Can you issue DDL in forms?&lt;br /&gt;4) Yes, but you have to use FORMS_DDL.&lt;br /&gt;Any string expression up to 32K:&lt;br /&gt;Ø      a literal&lt;br /&gt;Ø      an expression or a variable representing the text of a block of dynamically created PL/SQL code&lt;br /&gt;Ø      a DML statement or&lt;br /&gt;Ø      a DDL statement&lt;br /&gt;&lt;br /&gt;Restrictions:&lt;br /&gt;The statement you pass to FORMS_DDL may not contain bind variable references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL. &lt;br /&gt;&lt;br /&gt;5) What is SECURE property?&lt;br /&gt;5) Hides characters that the operator types into the text item.  This setting is typically used for password protection.&lt;br /&gt;&lt;br /&gt;6) What are the types of triggers and how the sequence of firing in text item&lt;br /&gt;6) Triggers can be classified as Key Triggers, Mouse Triggers, Navigational Triggers.&lt;br /&gt;&lt;br /&gt;Key Triggers: Key Triggers are fired as a result of Key action.&lt;br /&gt;e.g :: Key-next-field, Key-up, Key-Down&lt;br /&gt;&lt;br /&gt;Mouse Triggers: Mouse Triggers are fired as a result of the mouse navigation.&lt;br /&gt;e.g. When-mouse-button-pressed, when-mouse-doubleclicked, etc&lt;br /&gt;&lt;br /&gt;Navigational Triggers: These Triggers are fired as a result of Navigation.&lt;br /&gt;E.g :  Pre-text-item, Post-Text-item.&lt;br /&gt;&lt;br /&gt;We also have event triggers like when –new-form-instance and when-new-block-instance.&lt;br /&gt;We cannot call restricted procedures like go_to(‘my_block.first_item’) in the Navigational triggers But can use them in the Key-next-item.&lt;br /&gt;&lt;br /&gt;The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text  is fired as a result of the mouse movement. Key next will not fire unless there is a key event.&lt;br /&gt;The sequence of firing in a text item are as follows ::&lt;br /&gt;    a) pre - text&lt;br /&gt;    b) when new item&lt;br /&gt;    c) key-next&lt;br /&gt;    d) when validate&lt;br /&gt;    e) post text&lt;br /&gt;&lt;br /&gt;7) Can you store pictures in database? How?&lt;br /&gt;7) Yes, in long Raw datatype or BLOB datatype.&lt;br /&gt;&lt;br /&gt;8) What are property classes ? Can property classes have trigger?&lt;br /&gt;8) Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly.  By simply changing the definition of a property class, you can change the definition of all objects that inherit properties from that class.&lt;br /&gt;Yes . All type of triggers .&lt;br /&gt;&lt;br /&gt;9) If you have property class attached to an item and you have same trigger written for the item * Which will fire first?&lt;br /&gt;9) Item level trigger fires, If item level trigger fires, property level trigger won't fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.&lt;br /&gt;&lt;br /&gt;10) What are record groups? * Can record groups created at run-time?&lt;br /&gt;10) A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table.  However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined.  A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K.  Record group column names cannot exceed 30 characters. Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable.&lt;br /&gt;&lt;br /&gt;TYPES OF RECORD GROUP:&lt;br /&gt;Query Record Group   &lt;br /&gt;A query record group is a record group that has an associated SELECT statement. &lt;br /&gt;The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement.  The records in a query record group are the rows retrieved by the query associated with that record group.&lt;br /&gt;&lt;br /&gt;Non-query Record Group       &lt;br /&gt;A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.&lt;br /&gt;Static Record Group    &lt;br /&gt;A static record group is not associated with a query; rather, you define its&lt;br /&gt;Structure and row values at design time, and they remain fixed at runtime.&lt;br /&gt;&lt;br /&gt;11) What are ALERT?&lt;br /&gt;11) An ALERT is a modal window that displays a message notifying operator of some application condition.&lt;br /&gt;&lt;br /&gt;12) Can a button have icon and label at the same time?&lt;br /&gt;12)       -NO&lt;br /&gt;&lt;br /&gt;13) What is mouse navigate property of button?&lt;br /&gt;13) When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse. When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.&lt;br /&gt;&lt;br /&gt;14) What is FORMS_MDI_WINDOW?&lt;br /&gt;14) Forms run inside the MDI application window. This property is useful for calling a form from another one.&lt;br /&gt;&lt;br /&gt;15)  What are timers? When, when-timer-expired does not fire?&lt;br /&gt;15) The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.&lt;br /&gt;&lt;br /&gt;16) Can object group have a block?&lt;br /&gt;16) Yes, object group can have block as well as program units.&lt;br /&gt;&lt;br /&gt;17) How many types of canvases are there?&lt;br /&gt;17) There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. It’s like a plate on which we add items and stacked canvas is used for giving 3 dimensional effects.&lt;br /&gt; &lt;br /&gt;18) What are user-exits?&lt;br /&gt;18)  It invokes 3GL programs.&lt;br /&gt;&lt;br /&gt;19) Can you pass values to-and-fro from foreign function? how?&lt;br /&gt;19) Yes, You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item.  Make sure that the Oracle Forms variable or item is the same data type as the return value from the foreign function.&lt;br /&gt;After assigning an Oracle Forms variable or item value to a PL/SQL variable, pass the PL/SQL variable as a parameter value in the PL/SQL interface of the foreign function.  The PL/SQL variable that is passed as a parameter must be a valid PL/SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface. &lt;br /&gt;&lt;br /&gt;20) What is IAPXTB structure?&lt;br /&gt;20) The entries of Pro*C and user exits and the form which simulate the Pro*c or user_exit are stored in IAPXTB table in d/b.&lt;br /&gt;&lt;br /&gt;21) Can you call WIN-SDK thruo' user exits?&lt;br /&gt;21) YES.&lt;br /&gt;&lt;br /&gt;22) Does, user exits support DLL on MS-WINDOWS?&lt;br /&gt;22) YES.&lt;br /&gt;&lt;br /&gt;23) What is path setting for DLL?&lt;br /&gt;23) Make sure you include the name of the DLL in the FORMS45_USEREXIT variable of the ORACLE.INI file, or rename the DLL to F45XTB.DLL.  If you rename the DLL to F45XTB.DLL, replace the existing F45XTB.DLL in the \ORAWIN\BIN directory with the new F45XTB.DLL.&lt;br /&gt;&lt;br /&gt;24) How is mapping of name of DLL and function done?&lt;br /&gt;24) The DLL can be created using the Visual C++ / Visual Basic Tools and then the DLL is put in the path that is defined the registry.&lt;br /&gt;&lt;br /&gt;25) What is pre-compiler?&lt;br /&gt;25) It is similar to C pre-compiler directives.&lt;br /&gt;&lt;br /&gt;26) Can you connect to non - oracle data source ? How?&lt;br /&gt;26) Yes. &lt;br /&gt;&lt;br /&gt;27) What are key-mode and locking mode properties? level?&lt;br /&gt;27) Key Mode: Specifies how oracle forms uniquely identifies rows in the database. This is property includes for application that will run against NON-ORACLE data sources. Key setting unique (default.)&lt;br /&gt;                                                updateable&lt;br /&gt;                                                n-updateable.&lt;br /&gt;&lt;br /&gt;Locking mode:&lt;br /&gt;Specifies when Oracle Forms should attempt to obtain database locks on rows that correspond to queried records in the form.&lt;br /&gt;a) immediate b) delayed&lt;br /&gt;&lt;br /&gt;28) What are savepoint mode and cursor mode properties ? level?&lt;br /&gt;28) Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily for applications that will run against non-ORACLE data sources.   For applications that will run against ORACLE, use the default setting.&lt;br /&gt;Cursor mode - define cursor state across transaction&lt;br /&gt;Open/close.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;29) Can you replace default form processing? How?&lt;br /&gt;&lt;br /&gt;30) What is transactional trigger property?&lt;br /&gt;30)  Identifies a block as transactional control block. i.e. non - database block that oracle forms should manage  as transactional block.(NON-ORACLE datasource) default - FALSE.&lt;br /&gt;&lt;br /&gt;31) What is OLE automation?&lt;br /&gt;31) OLE automation allows an OLE server application to expose a set of commands and functions that can be invoked from an OLE container application.  OLE automation provides a way for an OLE container application to use the features of an OLE server application to manipulate an OLE object from the OLE container environment. (FORMS_OLE)&lt;br /&gt;&lt;br /&gt;34) What does invoke built-in do?&lt;br /&gt;34) This procedure invokes a method.&lt;br /&gt;Syntax:&lt;br /&gt;PROCEDURE OLE2.INVOKE (object obj_type, method VARCHAR2, list list_type:= 0);&lt;br /&gt;Parameters:&lt;br /&gt;Object Is an OLE2 Automation Object.&lt;br /&gt;Method Is a method (procedure) of the OLE2 object.&lt;br /&gt;List Is the name of an argument list assigned to the OLE2.CREATE_ARGLIST function.&lt;br /&gt;&lt;br /&gt;36) What is call form stack?&lt;br /&gt;36) When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack.&lt;br /&gt;&lt;br /&gt;37) Can u port applications across the platforms? how?&lt;br /&gt;37) Yes we can port applications across platforms. Consider the form developed in a windows system. The form would be generated in unix system by using f45gen my_form.fmb scott/tiger&lt;br /&gt;&lt;br /&gt;GUI&lt;br /&gt;&lt;br /&gt;1) What is a visual attribute?&lt;br /&gt;1) Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application's interface.&lt;br /&gt;&lt;br /&gt;2) Diff. between VAT and Property Class?  imp&lt;br /&gt;2) Named visual attributes define only font, color, and pattern attributes; property classes can contain these and any other properties. You can change the appearance of objects at runtime by changing the named visual attribute programmatically; property class assignment cannot be changed programmatically.&lt;br /&gt;When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored.&lt;br /&gt;&lt;br /&gt;3) Which trigger related to mouse?&lt;br /&gt;3) When-Mouse-Click&lt;br /&gt;    When-Mouse-DoubleClick&lt;br /&gt;    When-Mouse-Down&lt;br /&gt;    When-Mouse-Enter&lt;br /&gt;    When-Mouse-Leave&lt;br /&gt;    When-Mouse-Move&lt;br /&gt;     When-Mouse-Up&lt;br /&gt;&lt;br /&gt;4) What is Current record attribute property?&lt;br /&gt;4)  Specifies the named visual attribute used when an item is part of the current record. Current Record Attribute is frequently used at the block level to display the current row in a multi-record If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus  changes. &lt;br /&gt;&lt;br /&gt;5) Can u change VAT at run time?&lt;br /&gt;5) Yes. You can programmatically change an object's named visual attribute setting to change the font, color, and pattern of the object at runtime.&lt;br /&gt;&lt;br /&gt;6) Can u set default font in forms?&lt;br /&gt;6) Yes. Change windows registry(regedit). Set form45_font to the desired font.&lt;br /&gt;&lt;br /&gt;7) Can u have OLE objects in forms?&lt;br /&gt;7) Yes.&lt;br /&gt;&lt;br /&gt;8) Can u have VBX and OCX controls in forms?&lt;br /&gt;8) Yes.&lt;br /&gt;&lt;br /&gt;9) What r the types of windows (Window style)?&lt;br /&gt;9) Specifies whether the window is a Document window or a Dialog window.&lt;br /&gt;&lt;br /&gt;10) What is OLE Activation style property?&lt;br /&gt;10) Specifies the event that will activate the OLE containing item.&lt;br /&gt;&lt;br /&gt;11) Can u change the mouse pointer? How?&lt;br /&gt;11) Yes, Specifies the mouse cursor style.  Use this property to dynamically change the shape of the cursor.&lt;br /&gt;&lt;br /&gt;Reports 2.5&lt;br /&gt;&lt;br /&gt;1)      How many types of columns are there and what are they&lt;br /&gt;1)      Formula columns:&lt;br /&gt;For doing mathematical calculations and returning one value&lt;br /&gt;Summary Columns:&lt;br /&gt;For doing summary calculations such as summations etc.&lt;br /&gt;Place holder Columns:&lt;br /&gt;These columns are useful for storing the value in a variable&lt;br /&gt;&lt;br /&gt;2)      Can u have more than one layout in report&lt;br /&gt;2)      It is possible to have more than one layout in a report by using the additional layout option in the layout editor.&lt;br /&gt;&lt;br /&gt;3)  Can u run the report with out a parameter form&lt;br /&gt;3)      Yes it is possible to run the report without parameter form by setting the PARAM value to Null&lt;br /&gt;&lt;br /&gt;4)  What is the lock option in reports layout&lt;br /&gt;4)      By using the lock option we cannot move the fields in the layout editor outside the frame. This is useful for maintaining the fields.&lt;br /&gt;&lt;br /&gt;5)      What is Flex&lt;br /&gt;5) Flex is the property of moving the related fields together by setting the flex property on&lt;br /&gt;&lt;br /&gt;6)      What are the minimum number of groups required for a matrix report&lt;br /&gt;6)       The minimum of groups required for a matrix report are 4&lt;br /&gt;7. I switched the page size to 11x8.5, but the printer still prints in portrait.&lt;br /&gt;Even though you set the page size in the report properties, there is a another variable in the system parameters section under the data model in the object navigator called orientation. This sets the printer orientation. Oracle starts by setting it to "default" which means that no matter how you set the page size, the user's default printer setup will be used. You can also set it to either "Landscape" or "Portrait" to force the printer orientation no matter what the user has set as default. These sorts of picky, minor details are the ones which are invariably forgotten when you are designing your report and are the reason I created our two report templates, reptmp_p and reptmp_l (portrait and landscape). For anyone who wants a consistent look in their reports I strongly recommend building a similar pair to save yourself an ulcer, unless you actually like starting from scratch every time!?!&lt;br /&gt;8. I moved this field into that repeating frame, but I'm still getting a "frequency below it's group" error.&lt;br /&gt;Moving fields around does not change what enclosing object is considered it's parent group. Oracle carefully remembers what repeating frame a field was originally placed in and assigns that as it's parent. If you then reference a column further down the line of the query structure it will return that error. If you are not exactly sure which repeating frame a field belongs to, try dragging it out of all of them. Whichever frame will not allow it to escape is it's parent. To change a field's parent, first click on the lock button on the speed button bar. It should now look like an unlocked padlock. Now all of the fields on the layout can be repositioned regardless of their original parent items. When you are satisfied with the repositioning click the lock button again to lock the layout. Oracle will parse the layout and assumes that any item fully enclosed in a repeating frame is a child object of that frame. This can be confirmed again by trying to drag an object out of it's parent. (Cntrl - Z or edit..undo will put it back where it came from)&lt;br /&gt;Sometimes, for unknown and mysterious reasons, this method does not work. The alternative in this case is to highlight the field (or fields), cut it (cntrl-x), and then paste it into the desired frame. The paste does not initially set it into the right frame, but if you drag and drop it there before clicking on any other objects, and then click on something else, Oracle will usually figure what your intent was and assign the object(s) as a child of that frame. This is my preferred method of changing a field's parent as it works much more consistently then the unlock/lock method. One note though, if you are reassigning a group of fields, make sure the frame you are going to move them into is large enough to accept the whole group at once before you do the cut/paste. If you do the paste and then try to grow the frame to fit, you will have to cut and paste again. Once you de-select an object that has just been pasted, Oracle will assign it as a child of whatever it is in at the time.&lt;br /&gt;If this technique also fails, you are probably going to have to delete and then recreate the objects within the desired frame. If the object has triggers attached, save yourself some typing by creating the new object in the right frame, copying over the trigger code, and then deleting the old object&lt;br /&gt;9. I must put a repeating frame around these fields. How do I do this easily?&lt;br /&gt;Well congratulations, you have just discovered one of the main reasons why good planning goes a long way. Oracle looks at the layout as a sort of layered inheritance model such that anything created on top of and completely inside another object is by definition a child of that object. Creation order is there for critical to the layout process. This means that placing a repeating frame on top of a field but larger than that field fails the ownership criteria. At best, if the new frame is fully enclosed within the same higher level frame as the field then the two will be considered sibling children of the higher level frame.&lt;br /&gt;From this point you have two options. First, you can place the new repeating frame in the correct place and then use the techniques shown above in the "I moved this field but am still getting a frequency error" to reassign the fields into the new frame. There is also a second choice (which can also be used as a solution to the above). Go ahead and draw the new frame around the fields you want to have placed in it. Now if you try to click on one of the fields you will not be able to as they are fully covered by the new frame. Now go to the "Arrange" menu. You will find the options Send to back, bring to front, move forwards, move backwards. These are used to alter an object position in the Reports layer ordering. You use the "send backwards" option to move the frame backwards until all of the fields have popped to the front and are now enclosed in it. Oracle reassigns the new repeating frame as each object's parent as they pop to the front.&lt;br /&gt;Note that you can only move an object back and forth amongst it's siblings. You cannot set it back below it's parent, nor in front of it's children. This means that once an object has popped to the front and had a reassignment of parent, you cannot move it back using these tools.&lt;br /&gt;10. Why does part of a row sometimes get shifted to the next page, but not all of it?&lt;br /&gt;This is due to the way the scan works when Oracle is parsing the layout. If the tops of all the fields in a row are aligned and the fields are all of the same height and font, they should all stay together. I suspect, however, that Reports bases it's decision on the printed size rather than the field size you define to determine which objects are too large and must be shifted to the next page. This means that even if you set two fields top-aligned with the same height and font but one of them is bolded, the bolded field could get shifted to the next page due to it's bigger footprint. The solution is to put the whole row into a regular frame which is page protected.&lt;br /&gt;11. What exactly does the "Print Condition" do?&lt;br /&gt;The print condition type First, All, All but first, Last, All but last refer to the frequency with which you want to appear based upon the setting of the print condition object. A print condition object of Enclosing Object is whichever object encloses the current object (could be the parent or a frame within the parent), while Anchoring Object is the parent object (unless you have explicitly anchored the object in which case it is the object to which it is anchored). The key here is that this is about the pages on which the Print Condition Object appears, not the current object. Oracle views First as the first page on which any part of the Print Condition Object is printed, likewise Last is the last page on which any part of the Print Condition Object is printed. For objects inside a repeating frame, this condition is re-evaluated for each instance of the frame.&lt;br /&gt;As an example, assume we have created a field inside a repeating frame with Print Condition Object set to 'anchoring object', and Print Condition Type set to 'All But First'. On every instance of that repeating frame which is printed entirely within a single page, our object will not print. However, if an instance of that frame spans more than one page then our object will print on the second and every subsequent page that this instance of the repeating frame spans.&lt;br /&gt;For most objects you will not have to play with this print condition setting as the default setting is pretty good at determining what pages to print on, even though it only chooses between 'first' and 'last'. Only such things as heading objects you want reprinted on multiple pages are normally candidates for fooling around with this setting.&lt;br /&gt;1.      How do I create a truly dynamic 'where' condition which the user can input on the parameter form for my select statement?&lt;br /&gt;While setting a simple parameter for use in defining the select statement, such as a date, bill_period_id etc. is simple, there are times when you may wish to allow a user to add any "where" statement they wish. However, if you create a varchar user variable and try to reference it as an SQL condition ( e.g. Select * from account where :usercondition) you will get an error. The secret is that the variable must be initialized to a valid SQL condition before the Data Model will accept it. This is done in the "Initial Value" spot on the variable's properties form. The usual default is "1 = 1" which simply means all rows meeting whatever other conditions are included in the select statement will pass this condition if the user does not change it in the parameter form.&lt;br /&gt;12. How do I change a user parameter at runtime from a layout object trigger?&lt;br /&gt;Quite simply, you can't. Once the Before Report trigger has fired, Reports locks down the user parameters until the report is finished. Oh, I know you can put a statement into a layout trigger at design time and the compiler will accept it, but the moment you run the report you will get a nasty error and the report will die. Why they couldn't catch those problems at compile time I have no idea, except that it probably uses the same PL/SQL compiler as Forms which uses that same syntax for the perfectly acceptable function of changing field values.&lt;br /&gt;That being said, there is valid technique to mimic having a user variable which can be changed over the course of the report execution. What you have to do is create a PL/SQL package that contains a variable as well as the functions to read and write to that variable. Since variables inside a package are both local to that package and persistent over the duration of the run, you use this to save and change your variable value. I know that this seems like overkill, but it is the most efficient way of handling an issue that is very rarely encountered. As you can probably guess, this technique is a last resort to finding an SQL work around if one exists.&lt;br /&gt;13. How do I set the initial values of parameters for the parameter form at runtime?&lt;br /&gt;This is what the Before Form trigger is primarily used for. Even if you have used a select statement to create a lookup list for the parameter, this statement is fully parsed before the parameter form is opened. Simply setting the parameter to a given value in the Before Form trigger will select that option as the default value displayed to the user. For example, assume you have a parameter called p_input_date which is intended to hold an invoice date. The following example will select the most recent invoice date as the default, and note that it properly handles exceptions to ensure that the report does not arbitrarily die if this default setting fails. Note also that like all report triggers, it must return a true or false value. function BeforePForm return boolean isbeginselect max(bill_period_end_date + 1)  into :p_input_date  from billing_period where bill_period_end_date &lt;= (select trunc(sysdate) from dual);  return (TRUE);exception  when others then     :p_input_date := null;     return true;end;&lt;br /&gt;14. Why can't I highlight a bunch of fields and change all their format masks or print conditions at once?&lt;br /&gt;You can. If you highlight a bunch of objects and then right click and select "properties..", Oracle gives you a stacked set of the individual properties forms for each of the selected objects. While this may be useful for some things, it requires changing values individually for each object. However, instead you can select the group of fields and then select "Common properties" from the "Tools" menu which will allow you to set the format mask , print conditions etc. for the whole set of objects at once.&lt;br /&gt;15. How do I change the printed value of a field at runtime?&lt;br /&gt;Triggers are intended to simply provide a true or false return value to determine whether an object should be printed. It is generally not allowed to change any values held in the cursor, make changes to the database, or change the value of it's objects value. That being said, there is a highly unpublicized method of doing just that using the SRW.Set_Field_Char procedure. The syntax is SRW.Set_Field_char(0,) and the output of the object that the current trigger is attached to will be replaced by . There are also SRW.set_fileld_num, and SRW.set_field_date for numeric or date fields.&lt;br /&gt;While these options do work, they should only be used if a suitable NVL or DECODE statement in the original query is not possible as they are much, much slower to run. Also, note that this change of value only applies to the formatted output. It does not change the value held in the cursor and so can not be used for evaluating summary totals.&lt;br /&gt;Record group types There are three types of record groups: query record groups, non-query record groups, and static record groups.&lt;br /&gt;&lt;br /&gt;Query record group   A query record group is a record group that has an associated SELECT statement.  The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement.  The records in a query record group are the rows retrieved by the query associated with that record group. Query record groups can be created and modified at design time or at runtime.&lt;br /&gt;Non-query record group        A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime. Non-query record groups can be created and modified only at runtime.&lt;br /&gt;Static record group A static record group is not associated with a query; instead, you define its structure and row values at design time, and they remain fixed at runtime. Static record groups can be created and modified only at design time.&lt;br /&gt;You do not specify the record group type explicitly. The type is implied by when the record group is created (at design time or at runtime) and by how the group is defined.&lt;br /&gt;&lt;br /&gt;Table Type nodes Table types appear within the Types node in the Object Navigator. A table type node represents a type created by the SQL statement, CREATE TYPE AS TABLE. The table type is displayed in the Object Navigator as:&lt;br /&gt;table-type-name (TABLE OF table-subtype-name)&lt;br /&gt;The table type node is not expandable if the subtype is a built-in type. If the subtype is an object type or REF object, the attributes of the object appear as subnodes.&lt;br /&gt;&lt;br /&gt;The following SQL statements create the object type emp_typ and the table type emp_tbl.&lt;br /&gt;CREATE TYPE emp_typ AS OBJECT&lt;br /&gt;  (ename VARCHAR2(30), esalary NUMBER(5,2),&lt;br /&gt;  MEMBER PROCEDURE raise(amount NUMBER),&lt;br /&gt;  MEMBER FUNCTION get_salary RETURN NUMBER,&lt;br /&gt;  MAP MEMBER FUNCTION compare RETURN NUMBER);&lt;br /&gt;CREATE TYPE emp_tbl AS TABLE OF emp_typ;&lt;br /&gt;&lt;br /&gt;Oracle8 is an object-relational database management system, which means you can define additional kinds of data-specifying both the data and the ways of operating on it-and use these types within the relational model.&lt;br /&gt;There are two categories of user-defined datatypes: object types and collection types.  User-defined datatypes use the built-in datatypes (such as CHAR, VARCHAR2, and NUMBER) and other user-defined datatypes as the building blocks for datatypes that model the structure and behavior of data in applications.&lt;br /&gt;&lt;br /&gt;An object type serves as a template for objects. An object type specifies the elements (or attributes) that make up a structured data unit like a purchase order.  Some attributes, such as the list of line items, may be other structured data units.  An object type also specifies the operations (or methods) you can perform on the data unit, such as determining the total value of a purchase order.&lt;br /&gt;Collection types describe data units that are made up of an indefinite number of elements, all of the same datatype.  The collection types are varying array types and table types.&lt;br /&gt;&lt;br /&gt;A varying array type specifies a data unit called VARRAY, which is an ordered set of data elements all of the same datatype.  The number of elements in a VARRAY (or its size) is variable.  However, you must specify a maximum size when you declare the varying array type.&lt;br /&gt;A table type specifies a data unit called a nested table, which is an unordered set of data elements all of the same datatype.  A nested table has a single column, and the type of that column is a built-in type or an object type.&lt;br /&gt;&lt;br /&gt;Matrix reports A matrix (crosstab) report contains one row of labels, one column of labels, and information in a grid format that is related to the row and column labels.  A distinguishing feature of matrix reports is that the number of columns is not known until the data is fetched from the database. &lt;br /&gt;To create a matrix report, you need at least four groups: one group must be a cross-product group, two of the groups must be within the cross-product group to furnish the "labels," and at least one group must provide the information to fill the cells.  The groups can belong to a single query or to multiple queries. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What are the Delimiters we are using in the SQL* Loader?Delimiters are used to separate the column values in control file. In SQL * Loader we commonly using delimiters is ‘camas’.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4001637245518580860-4259872614523638649?l=comelearnandshare.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://comelearnandshare.blogspot.com/feeds/4259872614523638649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4001637245518580860&amp;postID=4259872614523638649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/4259872614523638649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4001637245518580860/posts/default/4259872614523638649'/><link rel='alternate' type='text/html' href='http://comelearnandshare.blogspot.com/2008/04/forms-and-reports.html' title='forms and reports'/><author><name>srikanthraj</name><uri>http://www.blogger.com/profile/11552888100357623820</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_LnM8wYjoT3k/SMe91z9uFbI/AAAAAAAAAAM/qU5UCrWrQwo/S220/oracle-9i-cake.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4001637245518580860.post-4734647344785867512</id><published>2008-04-28T10:19:00.000-03:00</published><updated>2008-04-28T10:25:03.548
