71 lines
4.6 KiB
HTML
71 lines
4.6 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="Examples: Use UDTs" />
|
|
<meta name="abstract" content="These are examples of using UDTs." />
|
|
<meta name="description" content="These are examples of using UDTs." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyuddt.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyudtcnst.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafycastudt.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyudtcomp.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyudsrc.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyasudt.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyasdyns.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyasdudt.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbafyudtuni.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbafyexampudt" />
|
|
<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>Examples: Use UDTs</title>
|
|
</head>
|
|
<body id="rbafyexampudt"><a name="rbafyexampudt"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Examples: Use UDTs</h1>
|
|
<div><p>These are examples of using UDTs.</p>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rbafyudtcnst.htm">Example: Comparisons between UDTs and constants</a></strong><br />
|
|
Suppose you want to know which products sold more than US $100 000.00 in the U.S. in the month of July, 1998 (7/98).</li>
|
|
<li class="ulchildlink"><strong><a href="rbafycastudt.htm">Example: Cast between UDTs</a></strong><br />
|
|
Suppose you want to define a UDF that converts Canadian dollars to U.S. dollars.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyudtcomp.htm">Example: Comparisons involving UDTs</a></strong><br />
|
|
Suppose you want to know which products sold more in the U.S. than in Canada and Germany for the month of March, 2003 (3/03).</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyudsrc.htm">Example: Sourced UDFs involving UDTs</a></strong><br />
|
|
<span>Suppose you have defined a sourced UDF on
|
|
the built-in SUM function to support SUM on Euros.</span></li>
|
|
<li class="ulchildlink"><strong><a href="rbafyasudt.htm">Example: Assignments involving UDTs</a></strong><br />
|
|
Suppose you want to store the form filled out by a new applicant into the database.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyasdyns.htm">Example: Assignments in dynamic SQL</a></strong><br />
|
|
If you want to use the same statement given in the example: Assignments involving UDTs in dynamic SQL, you can use parameter markers.</li>
|
|
<li class="ulchildlink"><strong><a href="rbafyasdudt.htm">Example: Assignments involving different UDTs</a></strong><br />
|
|
<span>Suppose you have defined two sourced UDFs
|
|
on the built-in SUM function to support SUM on U.S. and Canadian dollars,
|
|
similar to the UDF sourced on Euros in the Example: Sourced UDFs involving
|
|
UDTs.</span></li>
|
|
<li class="ulchildlink"><strong><a href="rbafyudtuni.htm">Example: Use of UDTs in UNION</a></strong><br />
|
|
<span>Suppose you want to provide your
|
|
U.S. users with a query to show all the sales of every product of your company.</span></li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafyuddt.htm" title="A user-defined distinct type is a mechanism that allows you to extend DB2 capabilities beyond the built-in data types available.">Use user-defined distinct types (UDT)</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |