blob: 89faa443de05015a2713ec7603ab8d26cdaa0fb4 [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="Executing a SQL Statement"/>
<meta name="abstract" content="Execute a SQL statement from an editor."/>
<meta name="description" content="Execute a SQL statement from an editor."/>
<meta name="DC.subject" content="sybase_workspace, database_development, dtp"/>
<meta name="keywords" content="sybase_workspace, database_development, dtp"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700466482.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700463513.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700480170.html"/>
<meta name="DC.Creator" content="ekapner"/>
<meta name="DitaCms:MapImporter:OriginalFileFullPath" content="\\kohman-xpvm1\tech_pubs_base_pool_1\projects\workspace\dmp\en\source\t_Executing_a_SQL_Statement.xml"/>
<meta name="DitaCms:MapImporter:OriginalObjectId" content="task_F7F8E0D433A7494AB45038BBD007D246"/>
<meta name="status" content="Authoring:work"/>
<meta name="source" content="Map Importer"/>
<meta name="comment:user" content="fixed typo"/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="asc1229700461576"/>
<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">Executing a SQL Statement</title>
<meta name="provider" content="Sybase, Inc."/></head>
<body id="asc1229700461576"><a name="asc1229700461576"><!-- --></a>
<br/>
<h1 class="topictitle1">Executing a SQL Statement</h1>
<div><p>Execute a SQL statement from an editor.
</p>
<div class="p" id="asc1229700461576__prereq_CF913DD6FF024C2CABC498E3A3954B96"><a name="asc1229700461576__prereq_CF913DD6FF024C2CABC498E3A3954B96"><!-- --></a><strong class="prereq-title">Prerequisites </strong>
<p>Be sure the data server for which you are executing a SQL statement is running, and you created and established a connection to the data
server. Open the SQL file<span> or procedural object its associated editor</span>.
</p>
</div>
<a name="asc1229700461576__steps_03E6D60A1A3A4F08A21BE19FF71E07A9"><!-- --></a><ol id="asc1229700461576__steps_03E6D60A1A3A4F08A21BE19FF71E07A9">
<li class="stepexpand" id="asc1229700461576__step_24A0CF72226D4EB493A055138918B009"><a name="asc1229700461576__step_24A0CF72226D4EB493A055138918B009"><!-- --></a>
<span>Highlight the SQL
statements you want to execute. </span>
<p>For procedural objects, open the editor's <span class="uicontrol">Source</span> page.</p>
</li>
<li class="stepexpand" id="asc1229700461576__step_BD9B792E1C574385A94CEE40A52452A4"><a name="asc1229700461576__step_BD9B792E1C574385A94CEE40A52452A4"><!-- --></a>
<span>Execute one, multiple, or all SQL statements.</span>
<a name="asc1229700461576__choicetable_A6ABA20AC17D433CA508D48A5A9CA86B"><!-- --></a>
<table border="1" frame="hsides" rules="rows" cellpadding="4" cellspacing="0" summary="" class="choicetableborder" id="asc1229700461576__choicetable_A6ABA20AC17D433CA508D48A5A9CA86B">
<thead><tr><th valign="bottom" align="left" id="d7601e75-option">To</th>
<th valign="bottom" align="left" id="d7601e75-desc">Do this</th></tr></thead>
<tbody>
<tr>
<td valign="top" headers="d7601e75-option" id="d7601e88"><strong>Execute one or more SQL statements </strong></td>
<td valign="top" headers="d7601e75-desc d7601e88">Hightlight the statements and select <span class="uicontrol">Execute Selected Text</span>.
</td>
</tr>
<tr>
<td valign="top" headers="d7601e75-option" id="d7601e100"><strong>Execute all statements
</strong></td>
<td valign="top" headers="d7601e75-desc d7601e100">Select
<span class="uicontrol">Execute All</span>.
</td>
</tr>
</tbody></table>
<p>Execution status and and results appear in the SQL Results
view.
</p>
</li>
</ol>
</div>
<div><div class="reltasks"><strong>Related tasks</strong><br/>
<div><a href="../../doc/html/asc1229700466482.html" title="You can execute a SQL file from the SQL File Editor or from WorkSpace Navigator.">Executing a SQL File</a></div>
<div><a href="../../doc/html/asc1229700463513.html" title="Use the Eclipse launch configuration mechanism to run an ad hoc SQL query.">Running an Ad Hoc SQL Statement</a></div>
<div><a href="../../doc/html/asc1229700480170.html" title="Use the SQL Results view to see the results of an executed SQL query or routine procedural object.">Viewing SQL Results</a></div>
</div>
</div>
<div/>
</body>
</html>