1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir 3226a8927SAndrew Rist<!--*********************************************************** 4cdf0e10cSrcweir * 5226a8927SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 6226a8927SAndrew Rist * or more contributor license agreements. See the NOTICE file 7226a8927SAndrew Rist * distributed with this work for additional information 8226a8927SAndrew Rist * regarding copyright ownership. The ASF licenses this file 9226a8927SAndrew Rist * to you under the Apache License, Version 2.0 (the 10226a8927SAndrew Rist * "License"); you may not use this file except in compliance 11226a8927SAndrew Rist * with the License. You may obtain a copy of the License at 12cdf0e10cSrcweir * 13226a8927SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 14cdf0e10cSrcweir * 15226a8927SAndrew Rist * Unless required by applicable law or agreed to in writing, 16226a8927SAndrew Rist * software distributed under the License is distributed on an 17226a8927SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18226a8927SAndrew Rist * KIND, either express or implied. See the License for the 19226a8927SAndrew Rist * specific language governing permissions and limitations 20226a8927SAndrew Rist * under the License. 21cdf0e10cSrcweir * 22226a8927SAndrew Rist ***********************************************************--> 23226a8927SAndrew Rist 2494e420e4Smseidel<helpdocument version="1.0"> 25cdf0e10cSrcweir<meta> 26cdf0e10cSrcweir<topic id="textsharedguidedata_enter_sqlxml" indexer="include" status="PUBLISH"> 27cdf0e10cSrcweir<title xml-lang="en-US" id="tit">Executing SQL Commands</title> 28cdf0e10cSrcweir<filename>/text/shared/guide/data_enter_sql.xhp</filename> 29cdf0e10cSrcweir</topic> 30cdf0e10cSrcweir</meta> 31cdf0e10cSrcweir<body> 3294e420e4Smseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3152801"> 3394e420e4Smseidel<bookmark_value>SQL; executing SQL commands</bookmark_value> 34cdf0e10cSrcweir<bookmark_value>queries;creating in SQL view</bookmark_value> 35cdf0e10cSrcweir<bookmark_value>commands;SQL</bookmark_value> 36cdf0e10cSrcweir<bookmark_value>executing SQL commands</bookmark_value> 37cdf0e10cSrcweir</bookmark><comment>mw changed "SQL;executing commands"</comment><comment>mw made "executing;" a one level entry</comment> 38*e2965a57Smseidel<paragraph xml-lang="en-US" id="hd_id3152801" role="heading" level="1" l10n="U"><variable id="data_enter_sql"><link href="text/shared/guide/data_enter_sql.xhp" name="Executing SQL Commands">Executing SQL Commands</link> 39cdf0e10cSrcweir</variable></paragraph> 40*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3147008" role="paragraph" l10n="U">With the help of SQL commands you can control the database directly, and can also create and edit tables and queries.</paragraph> 41*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3153562" role="note" l10n="U">Not all database types support all SQL instructions. If necessary, find out which SQL commands are supported by your database system.</paragraph> 42cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id9577929" role="heading" level="2" l10n="NEW">To execute an SQL statement directly</paragraph> 43cdf0e10cSrcweir<list type="ordered"> 44cdf0e10cSrcweir<listitem> 45cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id7923825" role="paragraph" l10n="NEW">Choose <emph>File - Open</emph> to open a database file.</paragraph> 46cdf0e10cSrcweir</listitem> 47cdf0e10cSrcweir<listitem> 48cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id9448530" role="paragraph" l10n="NEW">Choose <emph>Tools - SQL</emph>.</paragraph> 49cdf0e10cSrcweir</listitem> 50cdf0e10cSrcweir<listitem> 51*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3151176" role="paragraph" l10n="U">Click the <emph>Create Query in SQL View</emph> icon 52cdf0e10cSrcweir<image id="img_id3154071" src="res/commandimagelist/sc_dbnewquerysql.png" width="0.1862in" height="0.1862in"><alt xml-lang="en-US" id="alt_id3154071">Icon</alt> 53cdf0e10cSrcweir</image> or</paragraph> 54*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3145786" role="paragraph" l10n="U">Select an existing query from the list and click the <emph>Edit</emph> icon 55cdf0e10cSrcweir<image id="img_id3156212" src="res/commandimagelist/sc_dbqueryedit.png" width="0.2228in" height="0.2228in"><alt xml-lang="en-US" id="alt_id3156212">Icon</alt> 56cdf0e10cSrcweir</image>.</paragraph> 57cdf0e10cSrcweir</listitem> 58cdf0e10cSrcweir<listitem> 59*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3083443" role="paragraph" l10n="U">In the <emph>Query</emph> window, choose <emph>View - Switch Design View On/Off</emph>. Edit the SQL command.</paragraph> 60cdf0e10cSrcweir</listitem> 61cdf0e10cSrcweir<listitem> 62*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3152460" role="paragraph" l10n="U">Click the <emph>Run</emph> icon 63c33b1299Sdamjan<image id="img_id3152886" src="res/commandimagelist/sc_sbaexecutesql.png" width="0.2228in" height="0.2228in"><alt xml-lang="en-US" id="alt_id3152886">Icon</alt> 64cdf0e10cSrcweir</image>. The result of the query is displayed in the upper window.</paragraph> 65cdf0e10cSrcweir</listitem> 66cdf0e10cSrcweir<listitem> 67*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3149298" role="paragraph" l10n="U">Click the <emph>Save</emph> or <emph>Save As</emph> icon 68cdf0e10cSrcweir<image id="img_id3153159" src="res/commandimagelist/sc_save.png" width="0.2228in" height="0.2228in"><alt xml-lang="en-US" id="alt_id3153159">Icon</alt> 69cdf0e10cSrcweir</image> to save the query.</paragraph> 70cdf0e10cSrcweir</listitem> 71cdf0e10cSrcweir</list> 72cdf0e10cSrcweir<section id="relatedtopics"> 73*e2965a57Smseidel<paragraph xml-lang="en-US" id="par_id3153223" role="paragraph" l10n="U"><link href="text/shared/explorer/database/02010100.xhp" name="Query Design">Query Design</link></paragraph> 74cdf0e10cSrcweir<embed href="text/shared/guide/database_main.xhp#database_main"/> 75cdf0e10cSrcweir</section> 76cdf0e10cSrcweir</body> 77cdf0e10cSrcweir</helpdocument> 78