Edit C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\odbc\7.0.1\help\reference\sqlsupport.12.26.html
<?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 xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <!-- MOTW-DISABLED saved from url=(0014)about:internet --> <title>Update</title> <link rel="StyleSheet" href="css/sqlsupport.css" type="text/css" media="all" /> <link rel="StyleSheet" href="css/webworks.css" type="text/css" media="all" /> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/context.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/towwhdir.js"></script> <script type="text/javascript" language="JavaScript1.2" src="wwhdata/common/wwhpagef.js"></script> <script type="text/javascript" language="JavaScript1.2"> <!-- var WebWorksRootPath = ""; // --> </script> <script type="text/javascript" language="JavaScript1.2"> <!-- // Set reference to top level help frame // var WWHFrame = WWHGetWWHFrame("", true); // --> </script> <script type="text/javascript" language="JavaScript1.2" src="scripts/expand.js"></script> </head> <body class="" style="background-color: #FFFFEE;" onload="WWHUpdate();" onunload="WWHUnload();" onkeydown="WWHHandleKeyDown((document.all||document.getElementById||document.layers)?event:null);" onkeypress="WWHHandleKeyPress((document.all||document.getElementById||document.layers)?event:null);" onkeyup="WWHHandleKeyUp((document.all||document.getElementById||document.layers)?event:null);"> <br /> <div class="WebWorks_Breadcrumbs" style="text-align: left;"> <a class="WebWorks_Breadcrumb_Link" href="sqlsupport.12.01.html#109779">10 SQL Statements and Extensions for the Salesforce Driver</a> : Update</div> <hr align="left" /> <blockquote> <div class="head_1"><a name="109779">Update</a></div> <div class="Body"><a name="71340">An Update statement changes the value of columns in selected rows of a table. </a></div> <div class="gutter_text_right"><a name="71341">Grammar</a></div> <div class="syntax_first"><a name="89511">UPDATE </a><span class="EquationVariables">table_name</span> SET <span class="EquationVariables">column_name</span> = <span class="EquationVariables">expression</span><span style="font-style: italic;"> </span></div> <div class="syntax"><a name="97198">[, </a><span class="EquationVariables">column_name</span> = <span class="EquationVariables">expression</span>] [WHERE <span class="EquationVariables">conditions</span>]</div> <div class="Body"><span class="EquationVariables"><a name="89513">table_name</a></span> is the name of the table for which you want to update values. </div> <div class="Body"><span class="EquationVariables"><a name="89556">column_name</a></span> is the name of a column, the value of which is to be changed. Multiple column values can be changed in a single statement.</div> <div class="Body"><span class="EquationVariables"><a name="89515">expression</a></span> is the new value for the column. The expression can be a constant value or a subquery that returns a single value. Subqueries must be enclosed in parentheses. See <span class="Cross_ref_"><a href="javascript:WWHClickedPopup('reference', 'sqlsupport.12.28.html#94298', '');">â??Subqueriesâ??</a></span> for complete information about subqueries.</div> <div class="Body"><a name="89565">A Where clause can be used to restrict which rows are updated. See </a><span class="Cross_ref_"><a href="javascript:WWHClickedPopup('reference', 'sqlsupport.12.23.html#150264', '');">â??Where Clauseâ??</a></span> for details. </div> <div class="gutter_text_right"><a name="89521">Examples</a></div> <div class="hanging_label_head"><a name="89557">Example A</a></div> <div class="Body"><a name="149776">The following example changes every record that meets the conditions in the Where clause. </a>In this case, the salary and exempt status are changed for all employees having the employee ID <span class="Syntax">E10001</span>. Because employee IDs are unique in the emp table, only one record is updated.</div> <div class="syntax_first"><a name="89522">UPDATE emp SET salary=32000, exempt=1 </a></div> <div class="syntax"><a name="89523">WHERE emp_id = 'E10001'</a></div> <div class="hanging_label_head"><a name="89525">Example B</a></div> <div class="Body"><a name="149797">The following example uses a subquery. In this example, the salary is changed to the </a>average salary in the company for the employee having employee ID <span class="Syntax">E10001</span>.</div> <div class="syntax_first"><a name="89526">UPDATE emp SET salary = (SELECT avg(salary) FROM emp) </a></div> <div class="syntax"><a name="89527">WHERE emp_id = 'E10001'</a></div> <script type="text/javascript" language="JavaScript1.2"> <!-- // Clear related topics // WWHClearRelatedTopics(); document.writeln(WWHRelatedTopicsInlineHTML()); // --> </script> </blockquote> <script type="text/javascript" language="JavaScript1.2"> <!-- document.write(WWHRelatedTopicsDivTag() + WWHPopupDivTag() + WWHALinksDivTag()); // --> </script> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de