Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEUTL\qry_blr_cond.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Specifying Query Conditions</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T18:10:2Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="Specifying Query Conditions" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12511-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="qry_bldr.htm" title="Building Queries with Query..." type="text/html" /> <link rel="up" href="qry_blr_cond.htm" title="Specifying Query Conditions" type="text/html" /> <link rel="prev" href="qry_blr_obj.htm" title="Previous" type="text/html" /> <link rel="next" href="qry_blr_join.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="qry_bldr.htm" title="Building Queries with Query...">Building Queries with Query...</a> > Specifying Query Conditions</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="qry_blr_obj.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="qry_blr_join.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="BABCGHHE" name="BABCGHHE"></a></p> <div class="sect1"><!-- infolevel="all" infotype="General" --> <h1><a name="AEUTL295" id="AEUTL295"></a>Specifying Query <a id="sthref376" name="sthref376"></a><a id="sthref377" name="sthref377"></a>Conditions</h1> <p>Conditions enable you to filter and identify the data you want to work with. As you select columns within an object, you can specify conditions on the Conditions tab. You can use these attributes to modify the column alias, apply column conditions, sort columns, or apply functions.</p> <p>To specify query conditions:</p> <ol> <li> <p>On the Workspace home page, click <span class="bold">SQL Workshop</span> and then <span class="bold">Query Builder</span>.</p> <p>Query Builder appears.</p> </li> <li> <p>Select an object from the Object Selection pane.</p> <p>The selected object appears in the Design Pane.</p> </li> <li> <p>Select the columns to be included in your query by clicking the box to the left of the column name.</p> <p>When you select a column, you are indicating you want to include it in your query. As you select each column, it appears as a separate row in the Conditions view. <a href="#BABFEDED">Table: Conditions Tab</a> describes the attributes available on the Conditions tab.</p> <div class="tblformal"><a id="sthref378" name="sthref378"></a><a id="BABFEDED" name="BABFEDED"></a> <p class="titleintable">Conditions Tab</p> <table class="Formal" title="Conditions Tab" summary="This table describes the attributes available on the Conditions tab." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t8">Condition Attribute</th> <th align="left" valign="bottom" id="r1c2-t8">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t8" headers="r1c1-t8"> <p>Up and Down Arrows</p> </td> <td align="left" headers="r2c1-t8 r1c2-t8"> <p>Controls the order that the columns to be displayed in the resulting query. Click the arrow buttons to move columns up and down.</p> <p><span class="bold">See Also:</span> <a href="qry_blr_results.htm#CHDDIIGC">"Viewing Query Results"</a></p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t8" headers="r1c1-t8"> <p>Column</p> </td> <td align="left" headers="r3c1-t8 r1c2-t8"> <p>Displays the column name.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t8" headers="r1c1-t8"> <p>Alias</p> </td> <td align="left" headers="r4c1-t8 r1c2-t8"> <p>Specify an optional column alias. An <span class="bold">alias</span> is an alternative column name. Aliases are used to make a column name more descriptive, to shorten the column name, or prevent possible ambiguous references.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t8" headers="r1c1-t8"> <p>Condition</p> </td> <td align="left" headers="r5c1-t8 r1c2-t8"> <p>Specify a condition for the column.</p> <p>The condition you enter modifies the query's <code>WHERE</code> clause. When specifying a column condition, you must include the appropriate operator and operand. Consider the following examples:</p> <pre xml:space="preserve" class="oac_no_warn"> >=10 ='VA' IN (SELECT dept_no FROM dept) BETWEEN SYSDATE AND SYSDATE + 15 </pre></td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t8" headers="r1c1-t8"> <p>Sort Type</p> </td> <td align="left" headers="r6c1-t8 r1c2-t8"> <p>Select a sort type. Options include:</p> <ul> <li> <p>Ascending (<code>Asc</code>)</p> </li> <li> <p>Descending (<code>Desc</code>)</p> </li> </ul> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r7c1-t8" headers="r1c1-t8"> <p>Sort Order</p> </td> <td align="left" headers="r7c1-t8 r1c2-t8"> <p>Enter a number (1, 2, 3, and so on) to specify the order in which selected columns should display.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r8c1-t8" headers="r1c1-t8"> <p>Show</p> </td> <td align="left" headers="r8c1-t8 r1c2-t8"> <p>Select this check box to include the column in your query results. It is not necessary to select Show to add a column to the query for filtering only.</p> <p>For example, suppose you want to create following query:</p> <p><code>SELECT ename FROM emp WHERE deptno = 10</code></p> <p>To create this query in Query Builder:</p> <ol> <li> <p>From the Object list, select EMP.</p> </li> <li> <p>In the Design Pane, select <code>ename</code> and <code>deptno</code>.</p> </li> <li> <p>For the deptno column, in Condition enter <code>=10</code> and uncheck the Show check box.</p> </li> </ol> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r9c1-t8" headers="r1c1-t8"> <p>Function</p> </td> <td align="left" headers="r9c1-t8 r1c2-t8"> <p>Select an argument function. Available functions include:</p> <ul> <li> <p><span class="bold">NUMBER columns</span> - <code>COUNT</code>, <code>COUNT</code> <code>DISTINCT</code>, <code>AVG</code>, <code>MAXIMUM</code>,. <code>MINIMUM</code>, <code>SUM</code></p> </li> <li> <p><span class="bold">VARCHAR2, CHAR columns</span> - <code>COUNT</code>, <code>COUNT</code> <code>DISTINCT</code>, <code>INITCAP</code>, <code>LENGTH</code>, <code>LOWER</code>, <code>LTRIM</code>, <code>RTRIM</code>, <code>TRIM</code>, <code>UPPER</code></p> </li> <li> <p><span class="bold">DATE, TIMESTAMP columns</span> - <code>COUNT</code>, <code>COUNT</code> <code>DISTINCT</code></p> </li> </ul> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r10c1-t8" headers="r1c1-t8"> <p>Group By</p> </td> <td align="left" headers="r10c1-t8 r1c2-t8"> <p>Specify columns to be used for grouping when an aggregate function is used. Only applicable for columns included in output.</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r11c1-t8" headers="r1c1-t8"> <p>Delete</p> </td> <td align="left" headers="r11c1-t8 r1c2-t8"> <p>Deselect the column, excluding it from the query.</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <p>As you select columns and define conditions, Query Builder writes the SQL for you.</p> </li> <li> <p>To view the underlying SQL, click the <span class="bold">SQL</span> tab.</p> </li> </ol> </div> <!-- class="sect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="qry_blr_obj.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="qry_blr_join.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de