71 lines
3.9 KiB
HTML
71 lines
3.9 KiB
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 lang="en-us" xml:lang="en-us">
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|||
|
<meta name="security" content="public" />
|
|||
|
<meta name="Robots" content="index,follow" />
|
|||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|||
|
<meta name="DC.Type" content="reference" />
|
|||
|
<meta name="DC.Title" content="SQLPrepare and SQLNativeSQL escape sequences and scalar functions" />
|
|||
|
<meta name="abstract" content="ODBC has escape sequences and scalar functions that can be used to avoiding having to code directly to the syntax of a particular DBMS's version of SQL." />
|
|||
|
<meta name="description" content="ODBC has escape sequences and scalar functions that can be used to avoiding having to code directly to the syntax of a particular DBMS's version of SQL." />
|
|||
|
<meta name="DC.Relation" scheme="URI" content="rzaikodbcapifunctions.htm" />
|
|||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
|
|||
|
<meta name="DC.Format" content="XHTML" />
|
|||
|
<meta name="DC.Identifier" content="escapescalar" />
|
|||
|
<meta name="DC.Language" content="en-us" />
|
|||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|||
|
<!-- US Government Users Restricted Rights -->
|
|||
|
<!-- Use, duplication or disclosure restricted by -->
|
|||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|||
|
<title>SQLPrepare and SQLNativeSQL escape sequences and scalar functions</title>
|
|||
|
</head>
|
|||
|
<body id="escapescalar"><a name="escapescalar"><!-- --></a>
|
|||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|||
|
<h1 class="topictitle1">SQLPrepare and SQLNativeSQL escape sequences and scalar functions</h1>
|
|||
|
<div><p>ODBC has escape sequences and scalar functions that can be used
|
|||
|
to avoiding having to code directly to the syntax of a particular DBMS's version
|
|||
|
of SQL.</p>
|
|||
|
<div class="section"><p>See Microsoft's ODBC specification on how to use escape sequences.
|
|||
|
The following ODBC escape sequences are supported by the <span class="keyword">iSeries™ Access for Windows<sup>®</sup></span> ODBC
|
|||
|
driver.</p>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Escape sequences:</h4><ul><li>d</li>
|
|||
|
<li>t</li>
|
|||
|
<li>ts</li>
|
|||
|
<li>escape</li>
|
|||
|
<li>oj</li>
|
|||
|
<li>call</li>
|
|||
|
<li>?=call – This escape sequence should be used when trying to take advantage
|
|||
|
of the DB2<sup>®</sup> UDB
|
|||
|
for iSeries support
|
|||
|
for return values from a stored procedure. The parameter marker will need
|
|||
|
to be bound as an output parameter using the SQLBindParameter API. Note,
|
|||
|
at this time stored procedures can only return values of type integer.</li>
|
|||
|
<li>fn – This escape sequence is used when using the scalar functions below.
|
|||
|
The syntax is { fn scalar_function }.</li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
<div class="section"><h4 class="sectiontitle">Scalar functions mapped by the ODBC driver to the DB2 UDB for iSeries SQL
|
|||
|
syntax:</h4><ul><li>length</li>
|
|||
|
<li>log</li>
|
|||
|
<li>database (Mapped on pre-V5R3 servers only)</li>
|
|||
|
<li>insert (Mapped on pre-V5R3 servers only)</li>
|
|||
|
<li>right (Mapped on pre-V5R3 servers only) </li>
|
|||
|
</ul>
|
|||
|
<div class="note"><span class="notetitle">Note:</span> All other scalar functions are supported natively in the DB2 UDB for iSeries SQL
|
|||
|
syntax, so no mapping is required.</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div>
|
|||
|
<div class="familylinks">
|
|||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikodbcapifunctions.htm" title="Learn about implementations issues when using ODBC APIs.">Implementation issues of ODBC APIs</a></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</body>
|
|||
|
</html>
|