ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatc_5.4.0.1/rzatcsingletable.htm

70 lines
4.5 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="task" />
<meta name="DC.Title" content="Create a view over a single table" />
<meta name="DC.Relation" scheme="URI" content="rzatcview.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzatcsingletable" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Create a view over a single table</title>
</head>
<body id="rzatcsingletable"><a name="rzatcsingletable"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Create a view over a single table</h1>
<div><div class="section">The following example shows how to create a view on a single table.
The view is built on the INVENTORY_LIST table. The table has six columns,
but the view uses only three of the columns: ITEM_NUMBER, LAST_ORDER_DATE,
and QUANTITY_ON_HAND.<p>To create a view over a single table:</p>
</div>
<ol><li class="stepexpand"><span>In the <span class="keyword">iSeries™ Navigator</span> window,
expand the system that you want to use. </span></li>
<li class="stepexpand"><span>Expand <span class="uicontrol">Databases</span> and the database that you
want to work with.</span></li>
<li class="stepexpand"><span>Expand <span class="uicontrol">Schemas</span>.</span></li>
<li class="stepexpand"><span>Right-click SAMPLELIB and select <span class="uicontrol">New</span>, then <span class="uicontrol">View</span>.</span></li>
<li class="stepexpand"><span>On the New View window, type RECENT_ORDERS in the <span class="uicontrol">Name</span> field.</span></li>
<li class="stepexpand"><span>Specify SAMPLELIB in the <span class="uicontrol">Schema</span> field.</span></li>
<li class="stepexpand"><span>Optionally, you can specify a description.</span></li>
<li class="stepexpand"><span>Select a check option. A check option on a view specifies that
the values inserted or updated into a row must conform to the conditions of
the view. For this view, select <span class="uicontrol">None</span>.</span></li>
<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>. The New View definition window
appears.</span> <p><br /><img src="rzatc005.gif" alt="screen capture of new view window" /><br /></p>
</li>
<li class="stepexpand"><span>On the New View window, click <span class="uicontrol">Select tables</span>.</span></li>
<li class="stepexpand"><span>On the Browse for Tables window, expand SAMPLELIB, then select
INVENTORY_LIST.</span></li>
<li class="stepexpand"><span>Click <span class="uicontrol">Add</span>.</span></li>
<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>. INVENTORY_LIST should now be in
the work area on the New View window. </span></li>
<li class="stepexpand"><span>To choose the columns that you want in the new view, click them
in the selected tables and drag-and-drop them in the selection grid on the
bottom half of the window. Select ITEM_NUMBER, LAST_ORDER_DATE, and QUANTITY_ON_HAND.</span></li>
<li class="stepexpand"><span>The order that the columns appear in the selection grid is the
order that they will appear in the view. To change the order, select a column
and drag it to its new position. Put the columns in the following order: ITEM_NUMBER,
LAST_ORDER_DATE, QUANTITY_ON_HAND.</span></li>
</ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzatcview.htm">Create and use a view</a></div>
</div>
</div>
</body>
</html>