blob: eac3d69732bdda76ded711c7b1b55a3ea8f518c6 [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-us" xml:lang="en-us">
<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="Creating a SQL File"/>
<meta name="abstract" content="Use Database Development tools to create SQL files."/>
<meta name="description" content="Use Database Development tools to create SQL files."/>
<meta name="DC.subject" content="dtp"/>
<meta name="keywords" content="dtp"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700456982.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700458544.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700459919.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700466482.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700453997.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700455575.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700404058.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700405683.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700407058.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700408496.html"/>
<meta name="DC.Relation" scheme="URI" content="../../doc/html/asc1229700409121.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_creating_a_sql_file.xml"/>
<meta name="DitaCms:MapImporter:OriginalObjectId" content="t_cr41t836_1_761_5814_060606"/>
<meta name="status" content="Authoring:initial"/>
<meta name="source" content="Map Importer"/>
<meta name="comment:system" content="Imported topic [2008/12/19 08:27:32]"/>
<meta name="DC.Format" content="XHTML"/>
<meta name="DC.Identifier" content="asc1229700452591"/>
<meta name="DC.Language" content="en-US"/>
<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">Creating a SQL File</title>
<meta name="provider" content="Sybase, Inc."/></head>
<body id="asc1229700452591"><a name="asc1229700452591"><!-- --></a>
<br/>
<h1 class="topictitle1"> Creating a SQL File</h1>
<div><p>Use Database Development tools to create SQL files.
</p>
<div class="section" id="asc1229700452591__context_17FAA321FC5643129C485CDE127E9690"><a name="asc1229700452591__context_17FAA321FC5643129C485CDE127E9690"><!-- --></a>
<p> You can use an existing project to store the SQL file or create a
project when you create the SQL file.
</p>
</div>
<a name="asc1229700452591__steps_2014FEF261B249E8BF547C55636E8CDE"><!-- --></a><ol id="asc1229700452591__steps_2014FEF261B249E8BF547C55636E8CDE">
<li class="stepexpand" id="asc1229700452591__step_7C460D30A6E14481A9B1A26F91BF4B1C"><a name="asc1229700452591__step_7C460D30A6E14481A9B1A26F91BF4B1C"><!-- --></a>
<span>In the
<span class="uicontrol">Database Development</span> perspective, select
<span class="menucascade">
<span class="uicontrol">File</span>
&gt; <span class="uicontrol">New</span>
&gt; <span class="uicontrol">SQL
File</span>
</span>.</span>
<p>You can also click <a name="asc1229700452591__image_A4EA127786C5476B93FD6164D5910A85"><!-- --></a><img id="asc1229700452591__image_A4EA127786C5476B93FD6164D5910A85" src="../image/asc1229700451169.image" alt="Open SQL Scrapbook button"/>
<span class="uicontrol"> Open Scrapbook to Edit SQL Statements</span> to quickly create SQL statements in SQL Scrapbook.</p>
</li>
<li class="stepexpand" id="asc1229700452591__step_50CF3E88FF5F4B5CB8CBD2C3503D9FDB"><a name="asc1229700452591__step_50CF3E88FF5F4B5CB8CBD2C3503D9FDB"><!-- --></a>
<span> Associate the SQL file with a project.</span>
<a name="asc1229700452591__choicetable_D8E8078D747544BDAE807E5C2BFE6AF4"><!-- --></a>
<table border="1" frame="hsides" rules="rows" cellpadding="4" cellspacing="0" summary="" class="choicetableborder" id="asc1229700452591__choicetable_D8E8078D747544BDAE807E5C2BFE6AF4">
<thead><tr><th valign="bottom" align="left" id="d6748e87-option">To</th>
<th valign="bottom" align="left" id="d6748e87-desc">Do this</th></tr></thead>
<tbody>
<tr>
<td valign="top" headers="d6748e87-option" id="d6748e100"><strong>Use an existing project
</strong></td>
<td valign="top" headers="d6748e87-desc d6748e100">Enter or select the project in
the
<span class="uicontrol">Enter or Select the Parent Folder</span>.
</td>
</tr>
<tr>
<td valign="top" headers="d6748e87-option" id="d6748e112"><strong>Create a new project
</strong></td>
<td valign="top" headers="d6748e87-desc d6748e112">Click
<span class="uicontrol">Create Project</span>, and follow the wizard
instructions.
</td>
</tr>
</tbody></table>
</li>
<li class="stepexpand" id="asc1229700452591__step_9F0B2EBCFFE640A9A08870D67325939D"><a name="asc1229700452591__step_9F0B2EBCFFE640A9A08870D67325939D"><!-- --></a>
<span>Enter the <span class="uicontrol">File Name</span>.</span>
</li>
<li class="stepexpand" id="asc1229700452591__step_9B3EFE121F104133B252D823A24C4B4B"><a name="asc1229700452591__step_9B3EFE121F104133B252D823A24C4B4B"><!-- --></a>
<span>(Optional) Click
<span class="uicontrol">Advanced</span> to link to a file in the file system
and to create, edit, or remove defined path variables.</span>
</li>
<li class="stepexpand" id="asc1229700452591__step_26CBE629854A4BCEA78821537735E4D0"><a name="asc1229700452591__step_26CBE629854A4BCEA78821537735E4D0"><!-- --></a>
<span>(Optional) Associate the SQL file with a connection profile.</span>
<a name="asc1229700452591__substeps_8B86142DA7EB423F98F64F940F4AFECF"><!-- --></a><ol type="a" id="asc1229700452591__substeps_8B86142DA7EB423F98F64F940F4AFECF">
<li id="asc1229700452591__substep_889C2A1C950A42B8B769CD732B900438"><a name="asc1229700452591__substep_889C2A1C950A42B8B769CD732B900438"><!-- --></a>
<span>Select a <span class="uicontrol">Connection Profile Type</span>.</span>
</li>
<li id="asc1229700452591__substep_046927259D3A401E82DBEB756A1FBBA6"><a name="asc1229700452591__substep_046927259D3A401E82DBEB756A1FBBA6"><!-- --></a>
<span>Select a
<span class="uicontrol">Connection Profile Name</span>, or click <span class="uicontrol">Create</span> to create one.
</span>
</li>
<li id="asc1229700452591__substep_13A035ED69F24878AC0688CD9FF41875"><a name="asc1229700452591__substep_13A035ED69F24878AC0688CD9FF41875"><!-- --></a>
<span>Select
the <span class="uicontrol">Database Name</span>.</span>
</li>
</ol>
</li>
<li class="stepexpand" id="asc1229700452591__step_4A9997D631E74AD68F71C20C66D8B138"><a name="asc1229700452591__step_4A9997D631E74AD68F71C20C66D8B138"><!-- --></a>
<span>(Optional) Select
<span class="uicontrol">Do Not Connect Now</span> to remain disconnected from the server.</span>
<p>You cannot use the complete Content Assist feature if you select this option.
</p>
</li>
<li class="stepexpand" id="asc1229700452591__step_71B8EF2B95B841CDB340971E38D1B711"><a name="asc1229700452591__step_71B8EF2B95B841CDB340971E38D1B711"><!-- --></a>
<span>Click
<span class="uicontrol">Finish</span>.</span>
<p>A SQL file is created under the project in
<span>WorkSpace
</span>Navigator and opens in the SQL File Editor.
</p>
</li>
<li class="stepexpand" id="asc1229700452591__step_78D94C31EB034BE59DBDECD551A521D3"><a name="asc1229700452591__step_78D94C31EB034BE59DBDECD551A521D3"><!-- --></a>
<span>Right-click in the
SQL File Editor and select
<span class="uicontrol">Visual SQL</span>
<span class="uicontrol">Edit in SQL Query Builder</span> to graphically build SQL statements, or type
your SQL directly in the editor window.</span>
</li>
<li class="stepexpand" id="asc1229700452591__step_D4A4170DE3414ABA80FA02B68F1CE041"><a name="asc1229700452591__step_D4A4170DE3414ABA80FA02B68F1CE041"><!-- --></a>
<span>(Optional) To add or remove comment delimiters for a line of code, right-click one or more lines of code, and select <span class="uicontrol">Toggle Comment</span>. </span>
</li>
<li class="stepexpand" id="asc1229700452591__step_5BFBF994DF7D4EF9BB55800B40952687"><a name="asc1229700452591__step_5BFBF994DF7D4EF9BB55800B40952687"><!-- --></a>
<span>When finished, save the SQL file.</span>
</li>
</ol>
</div>
<div><div class="relconcepts"><strong>Related concepts</strong><br/>
<div><a href="../../doc/html/asc1229700453997.html" title="Use the SQL File Editor to create and edit SQL statements.">SQL File Editor</a></div>
<div><a href="../../doc/html/asc1229700455575.html" title="SQL Scrapbook enables you to quickly create and execute SQL commands and queries, as well as procedural objects without creating a SQL file.">SQL Scrapbook</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br/>
<div><a href="../../doc/html/asc1229700456982.html" title="Edit the SQL statements in a SQL file.">Editing a SQL File</a></div>
<div><a href="../../doc/html/asc1229700458544.html" title="Open a SQL file for viewing or editing in the SQL File Editor.">Opening a SQL File</a></div>
<div><a href="../../doc/html/asc1229700459919.html" title="Save one or more SQL files to the current project, or save a SQL file to a different project or to a different file name.">Saving a SQL File</a></div>
<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>
<div class="relref"><strong>Related reference</strong><br/>
<div><a href="../../doc/html/asc1229700404058.html" title="SQL Editor preferences define the behavior of the SQL File Editor.">SQL Editor Preferences</a></div>
<div><a href="../../doc/html/asc1229700405683.html" title="SQL Editor Code Assist preferences define the behavior of the Code Assist feature in SQL File Editor.">Code Assist Preferences</a></div>
<div><a href="../../doc/html/asc1229700407058.html" title="SQL files and scrapbooks preferences define the behavior of SQL files in SQL File Editor and SQL Scrapbook.">SQL Files/Scrapbooks Preferences</a></div>
<div><a href="../../doc/html/asc1229700408496.html" title="Indicate your preferences for syntax coloring and text style for SQL source code in SQL Editor or SQL Scrapbook.">Syntax Coloring Preferences</a></div>
<div><a href="../../doc/html/asc1229700409121.html" title="You can create new SQL templates and edit existing ones.">Templates Preferences</a></div>
</div>
</div>
<div/>
</body>
</html>