blob: 7848c5a3a37def6ad3a298a302a1814549a6ec90 [file] [log] [blame]
<?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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="copyright" content="(C) Copyright 2005"/>
<meta name="DC.rights.owner" content="(C) Copyright 2005"/>
<meta name="DC.Type" content="task"/>
<meta name="DC.Title" content="Building Expressions"/>
<meta name="abstract" content="Use the Expression Builder in SQL Query Builder to build simple or complex expressions, or subqueries when creating SELECT, UPDATE, INSERT, and DELETE statements."/>
<meta name="description" content="Use the Expression Builder in SQL Query Builder to build simple or complex expressions, or subqueries when creating SELECT, UPDATE, INSERT, and DELETE statements."/>
<meta name="DC.subject" content="dtp"/>
<meta name="keywords" content="dtp"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700429574.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700435668.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700437325.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700441997.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700443669.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700448153.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700449560.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700427574.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700410527.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700446684.html"/>
<meta name="DC.Creator" content="ekapner"/>
<meta name="DitaCms:MapImporter:OriginalFileFullPath" content="\\kohman-xpvm1\tech_pubs_base_pool_1\projects\dtp\dtp\en\source\t_building_expressions.xml"/>
<meta name="DitaCms:MapImporter:OriginalObjectId" content="task_303B2403E2C34EC3ACAB5DB5C680C12C"/>
<meta name="status" content="Authoring:initial"/>
<meta name="source" content="Map Importer"/>
<meta name="comment:system" content="Imported topic [2008/12/19 08:27:25]"/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="asc1229700445247"/>
<meta name="DC.Language" content="en"/>
<link rel="stylesheet" type="text/css" href="../../styles/commonltr.css"/>
<link rel="stylesheet" type="text/css" href="../../styles/doc.css"/>
<title xmlns:xs="http://www.w3.org/2001/XMLSchema">Building Expressions</title>
<meta name="provider" content="Sybase, Inc."/></head>
<body id="asc1229700445247"><a name="asc1229700445247"><!-- --></a>
<br/>
<h1 class="topictitle1">Building Expressions</h1>
<div><p>Use the Expression Builder in SQL Query Builder to build simple or complex
expressions, or subqueries when creating SELECT, UPDATE, INSERT, and DELETE statements.
</p>
<div class="p" id="asc1229700445247__prereq_0706C2975DB945CD95B1B273EE5925FF"><a name="asc1229700445247__prereq_0706C2975DB945CD95B1B273EE5925FF"><!-- --></a><strong class="prereq-title">Prerequisites </strong>
<div class="p">
<br/><a name="asc1229700445247__d544e42"><!-- --></a><ol id="asc1229700445247__d544e42">
<li id="asc1229700445247__d544e44"><a name="asc1229700445247__d544e44"><!-- --></a>Connect to the data source through a connection profile.</li>
<li id="asc1229700445247__d544e47"><a name="asc1229700445247__d544e47"><!-- --></a>Open a new or existing SQL file, and be sure to select the connection profile <span class="uicontrol">Type</span>, <span class="uicontrol">Name</span>, and <span class="uicontrol">Database</span>.</li>
<li id="asc1229700445247__d544e59"><a name="asc1229700445247__d544e59"><!-- --></a>Edit an existing SQL statement or create a new one in SQL Query Builder. </li>
</ol>
</div>
</div>
<div class="section" id="asc1229700445247__context_3BB19919A9824126AFF94CDE9F76FBEF"><a name="asc1229700445247__context_3BB19919A9824126AFF94CDE9F76FBEF"><!-- --></a>
<div class="note"><span class="notetitle">Note:</span> Some syntactic variations might exist between your database and the SQL syntax that SQL Query Builder supports; consequently, some SQL Query Builder features might not work with your database.</div>
</div>
<a name="asc1229700445247__steps_4C454E80CFA441589866C6503DE7DCBF"><!-- --></a><ol id="asc1229700445247__steps_4C454E80CFA441589866C6503DE7DCBF">
<li id="asc1229700445247__step_ED0B5454387C4F6BA7C1271C724749C2"><a name="asc1229700445247__step_ED0B5454387C4F6BA7C1271C724749C2"><!-- --></a>
<span>In the <span class="uicontrol">Column</span> cell in which you want to create the expression, select <span class="uicontrol">Build Expression</span>, and then click outside the cell to launch the Expression Builder wizard.</span>
</li>
<li id="asc1229700445247__step_8481F5C6F5CC497CBD4E60573018BC42"><a name="asc1229700445247__step_8481F5C6F5CC497CBD4E60573018BC42"><!-- --></a>
<span>Select the expression type and click <span class="uicontrol">Next</span>.</span>
</li>
<li id="asc1229700445247__step_4429EC8A9CE54BD1A60FDDAE87487781"><a name="asc1229700445247__step_4429EC8A9CE54BD1A60FDDAE87487781"><!-- --></a>
<span>Enter appropriate information in the wizard pages.</span>
</li>
<li id="asc1229700445247__step_E6AD5C0005B249FA93A09A480E9602B5"><a name="asc1229700445247__step_E6AD5C0005B249FA93A09A480E9602B5"><!-- --></a>
<span>Once you enter all applicable information, click <span class="uicontrol">Finish</span>.</span>
</li>
</ol>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br/>
<div><a href="../../doc/html/asc1229700427574.html" title="Create, edit, or run SQL statements using the SQL Query Builder graphical interface, which provides access to your database schema and objects so that you can quickly create or edit SQL statements without actually typing any SQL code. However, you also have the flexibility to add or modify the SQL code in the editor window.">SQL Query Builder</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br/>
<div><a href="../../doc/html/asc1229700429574.html" title="Use SQL Query Builder to create a SELECT statement to retrieve data from a database and display the results set in table format.">Creating a SELECT Statement</a></div>
<div><a href="../../doc/html/asc1229700435668.html" title="Use SQL Query Builder to create an INSERT statement to insert new rows at the end of a table with the values you indicate for the specified columns.">Creating an INSERT Statement From a Values Set</a></div>
<div><a href="../../doc/html/asc1229700437325.html" title="Use SQL Query Builder to create an INSERT statement from a subquery.">Creating an INSERT Statement From a Subquery</a></div>
<div><a href="../../doc/html/asc1229700441997.html" title="Use SQL Query Builder to create an UPDATE statement to update data in a table. You can explicitly set the values or derive them from the results of a build expression.">Creating an UPDATE Statement</a></div>
<div><a href="../../doc/html/asc1229700443669.html" title="Use SQL Query Builder to create a DELETE statement to remove data from a specified table. By specifying one or more conditions, you can indicate which rows in the database table to delete. If you do not specify any conditions, all rows in the target table are deleted.">Creating a DELETE Statement</a></div>
<div><a href="../../doc/html/asc1229700448153.html" title="Use SQL Query Builder to edit an individual SQL statement. You can only edit one SQL statement at a time.">Editing a SQL Statement</a></div>
<div><a href="../../doc/html/asc1229700449560.html" title="Use SQL Query Builder to run an individual SQL statement and view its execution results.">Running the SQL Statement Code</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br/>
<div><a href="../../doc/html/asc1229700410527.html" title="Indicate the SQL Query Builder preferences.">SQL Query Builder Preferences</a></div>
<div><a href="../../doc/html/asc1229700446684.html" title="In SQL Query Builder, you can use build expressions of these types when creating SQL statements.">Expression Types</a></div>
</div>
</div>
<div/>
</body>
</html>