<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rssdatehelper="urn:rssdatehelper"><channel><title>Daily BS</title><link>http://www.cenonsolutions.com</link><pubDate></pubDate><generator>umbraco</generator><description>Ramblings of Brian Spencer</description><language>en</language><item><title>Import SSIS package using DTUTIL</title><link>http://www.cenonsolutions.com/2010/2/25/import-ssis-package-using-dtutil</link><pubDate>Thu, 25 Feb 2010 21:12:07 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/2/25/import-ssis-package-using-dtutil</guid><content:encoded><![CDATA[ 
<p>To import an SSIS dtsx package into SQL Server, use can use the
DTUTIL utility with the following syntax:</p>

<p>dtutil /FILE &lt;name&gt;.dtsx /DESTSERVER SQLServer /COPY
SQL;&lt;name&gt;</p>

<p>To import multiple SSIS dtsx packages into SQL Server, you can
use a combination of the DTUTIL utility and the FOR batch command
to load each dtsx file in a directory.</p>

<p>Execute the following command at a command prompt or from a
command or batch file.</p>

<p>FOR %i In (*.dtsx) DO dtutil /FILE %i /DESTSERVER SQLServer
/COPY SQL;DTSX_%~ni</p>
]]></content:encoded></item><item><title>What is the SOLID programming principle?</title><link>http://www.cenonsolutions.com/2010/2/24/what-is-the-solid-programming-principle</link><pubDate>Wed, 24 Feb 2010 10:19:38 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/2/24/what-is-the-solid-programming-principle</guid><content:encoded><![CDATA[ 
<p>SOLID was introduced by Robert C. Martin and stands for the five
principles of object-oriented programming and design that if
following will create a system that is easy to maintain and
extend.</p>

<p>The five principle of SOLID programming are:<br />
1. <a
href="http://en.wikipedia.org/wiki/Single_responsibility_principle">
Single responsibility principle</a> - an object should only have a
single responsibility.<br />
2. <a
href="http://en.wikipedia.org/wiki/Open/closed_principle">Open/closed
principle</a> - open for extension, but closed for
modification.<br />
3. <a
href="http://en.wikipedia.org/wiki/Liskov_substitution_principle">Liskov
substitution principle</a> - defines a notion of substitution of <a
href="http://en.wikipedia.org/wiki/Mutable">mutable</a>
objects.<br />
4. <a
href="http://en.wikipedia.org/wiki/Interface_segregation_principle">
Interface segregation principle</a> - many specific interfaces are
better than one general purpose interface.<br />
5. <a
href="http://en.wikipedia.org/wiki/Dependency_inversion_principle">Dependency
inversion principle</a> - depend upon abstractions.&nbsp; Also
known as <a
href="http://en.wikipedia.org/wiki/Inversion_of_control">inversion
of control</a>.</p>
]]></content:encoded></item><item><title>Kindle Development Kit coming next month</title><link>http://www.cenonsolutions.com/2010/1/21/kindle-development-kit-coming-next-month</link><pubDate>Thu, 21 Jan 2010 13:04:46 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/21/kindle-development-kit-coming-next-month</guid><content:encoded><![CDATA[ 
<p>Amazon will release a Kindle Development Kit limited beta next
month that will allow software developers to create apps for the
Kindle.&nbsp; The revenue share will be 70% to the developer and
30% to Amazon net of delivery fees of $0.15 / MB.</p>

<p>Pricing options include Free, One-time purchase, and Monthly
Subscription.</p>

<p>Source: <a title="development kit"
href="http://www.amazon.com/kdk/">http://www.amazon.com/kdk/</a></p>
]]></content:encoded></item><item><title>SQL Server Analysis Services XMLA command to return a list of cubes in a catalog</title><link>http://www.cenonsolutions.com/2010/1/15/sql-server-analysis-services-xmla-command-to-return-a-list-of-cubes-in-a-catalog</link><pubDate>Fri, 15 Jan 2010 08:56:36 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/15/sql-server-analysis-services-xmla-command-to-return-a-list-of-cubes-in-a-catalog</guid><content:encoded><![CDATA[ 
<p>To return a list of SQL Server Analysis Services cubes in a
catalog, use the MDSCHEMA_CUBES request type.</p>

<p>For example, lets return a list of cubes for the Catalog1 SSAS
catalog.</p>

<pre class="code">
<span>&lt;</span><span>Discover</span> <span>xmlns</span><span>=</span>"<span>urn:schemas-microsoft-com:xml-analysis</span>"<span>&gt;
  &lt;</span><span>RequestType</span><span>&gt;</span>MDSCHEMA_CUBES<span>&lt;/</span><span>RequestType</span><span>&gt;
  &lt;</span><span>Restrictions</span> <span>/&gt;
  &lt;</span><span>Properties</span><span>&gt;
    &lt;</span><span>PropertyList</span><span>&gt;
      &lt;</span><span>Catalog</span><span>&gt;</span>Catalog1<span>&lt;/</span><span>Catalog</span><span>&gt;
    &lt;/</span><span>PropertyList</span><span>&gt;
  &lt;/</span><span>Properties</span><span>&gt;
&lt;/</span><span>Discover</span><span>&gt;</span>
</pre>

<p>The MDSCHEMA_CUBES request type will return a list of SSAS cubes
in XML format similar to the following.</p>

<pre class="code">
<span>&lt;</span><span>return</span> <span>xmlns</span><span>=</span>"<span>urn:schemas-microsoft-com:xml-analysis</span>"<span>&gt;
  &lt;</span><span>root</span> <span>xmlns</span><span>=</span>"<span>urn:schemas-microsoft-com:xml-analysis:rowset</span>" 
        <span>xmlns:xsi</span><span>=</span>"<span>http://www.w3.org/2001/XMLSchema-instance</span>" 
        <span>xmlns:xsd</span><span>=</span>"<span>http://www.w3.org/2001/XMLSchema</span>"<span>&gt;
    &lt;</span><span>xsd:schema</span> <span>targetNamespace</span><span>=</span>"<span>urn:schemas-microsoft-com:xml-analysis:rowset</span>" 
                <span>xmlns:sql</span><span>=</span>"<span>urn:schemas-microsoft-com:xml-sql</span>" 
                <span>elementFormDefault</span><span>=</span>"<span>qualified</span>"<span>&gt;
      &lt;</span><span>xsd:element</span> <span>name</span><span>=</span>"<span>root</span>"<span>&gt;
        &lt;</span><span>xsd:complexType</span><span>&gt;
          &lt;</span><span>xsd:sequence</span> <span>minOccurs</span><span>=</span>"<span>0</span>" <span>maxOccurs</span><span>=</span>"<span>unbounded</span>"<span>&gt;
            &lt;</span><span>xsd:element</span> <span>name</span><span>=</span>"<span>row</span>" <span>type</span><span>=</span>"<span>row</span>" <span>/&gt;
          &lt;/</span><span>xsd:sequence</span><span>&gt;
        &lt;/</span><span>xsd:complexType</span><span>&gt;
      &lt;/</span><span>xsd:element</span><span>&gt;
      &lt;</span><span>xsd:simpleType</span> <span>name</span><span>=</span>"<span>uuid</span>"<span>&gt;
        &lt;</span><span>xsd:restriction</span> <span>base</span><span>=</span>"<span>xsd:string</span>"<span>&gt;
          &lt;</span><span>xsd:pattern</span> <span>value</span><span>=</span>"<span>[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]
                       {4}-[0-9a-zA-Z]{12}</span>" <span>/&gt;
        &lt;/</span><span>xsd:restriction</span><span>&gt;
      &lt;/</span><span>xsd:simpleType</span><span>&gt;
      &lt;</span><span>xsd:complexType</span> <span>name</span><span>=</span>"<span>xmlDocument</span>"<span>&gt;
        &lt;</span><span>xsd:sequence</span><span>&gt;
          &lt;</span><span>xsd:any</span> <span>/&gt;
        &lt;/</span><span>xsd:sequence</span><span>&gt;
      &lt;/</span><span>xsd:complexType</span><span>&gt;
      &lt;</span><span>xsd:complexType</span> <span>name</span><span>=</span>"<span>row</span>"<span>&gt;
        &lt;</span><span>xsd:sequence</span><span>&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CATALOG_NAME</span>" <span>name</span><span>=</span>"<span>CATALOG_NAME</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>SCHEMA_NAME</span>" <span>name</span><span>=</span>"<span>SCHEMA_NAME</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CUBE_NAME</span>" <span>name</span><span>=</span>"<span>CUBE_NAME</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CUBE_TYPE</span>" <span>name</span><span>=</span>"<span>CUBE_TYPE</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CUBE_GUID</span>" <span>name</span><span>=</span>"<span>CUBE_GUID</span>" <span>type</span><span>=</span>"<span>uuid</span>" <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CREATED_ON</span>" <span>name</span><span>=</span>"<span>CREATED_ON</span>" <span>type</span><span>=</span>"<span>xsd:dateTime</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>LAST_SCHEMA_UPDATE</span>" <span>name</span><span>=</span>"<span>LAST_SCHEMA_UPDATE</span>" 
                       <span>type</span><span>=</span>"<span>xsd:dateTime</span>" <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>SCHEMA_UPDATED_BY</span>" <span>name</span><span>=</span>"<span>SCHEMA_UPDATED_BY</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>LAST_DATA_UPDATE</span>" <span>name</span><span>=</span>"<span>LAST_DATA_UPDATE</span>" <span>type</span><span>=</span>"<span>xsd:dateTime</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>DATA_UPDATED_BY</span>" <span>name</span><span>=</span>"<span>DATA_UPDATED_BY</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>DESCRIPTION</span>" <span>name</span><span>=</span>"<span>DESCRIPTION</span>" <span>type</span><span>=</span>"<span>xsd:string</span>"
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>IS_DRILLTHROUGH_ENABLED</span>" <span>name</span><span>=</span>"<span>IS_DRILLTHROUGH_ENABLED</span>" 
                       <span>type</span><span>=</span>"<span>xsd:boolean</span>" <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>IS_LINKABLE</span>" <span>name</span><span>=</span>"<span>IS_LINKABLE</span>" <span>type</span><span>=</span>"<span>xsd:boolean</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>IS_WRITE_ENABLED</span>" <span>name</span><span>=</span>"<span>IS_WRITE_ENABLED</span>" <span>type</span><span>=</span>"<span>xsd:boolean</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>IS_SQL_ENABLED</span>" <span>name</span><span>=</span>"<span>IS_SQL_ENABLED</span>" <span>type</span><span>=</span>"<span>xsd:boolean</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CUBE_CAPTION</span>" <span>name</span><span>=</span>"<span>CUBE_CAPTION</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>BASE_CUBE_NAME</span>" <span>name</span><span>=</span>"<span>BASE_CUBE_NAME</span>" <span>type</span><span>=</span>"<span>xsd:string</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
          &lt;</span><span>xsd:element</span> <span>sql:field</span><span>=</span>"<span>CUBE_SOURCE</span>" <span>name</span><span>=</span>"<span>CUBE_SOURCE</span>" <span>type</span><span>=</span>"<span>xsd:unsignedShort</span>" 
                       <span>minOccurs</span><span>=</span>"<span>0</span>" <span>/&gt;
        &lt;/</span><span>xsd:sequence</span><span>&gt;
      &lt;/</span><span>xsd:complexType</span><span>&gt;
    &lt;/</span><span>xsd:schema</span><span>&gt;
    &lt;</span><span>row</span><span>&gt;
      &lt;</span><span>CATALOG_NAME</span><span>&gt;</span>Cube1<span>&lt;/</span><span>CATALOG_NAME</span><span>&gt;
      &lt;</span><span>CUBE_NAME</span><span>&gt;</span>Top Level<span>&lt;/</span><span>CUBE_NAME</span><span>&gt;
      &lt;</span><span>CUBE_TYPE</span><span>&gt;</span>CUBE<span>&lt;/</span><span>CUBE_TYPE</span><span>&gt;
      &lt;</span><span>LAST_SCHEMA_UPDATE</span><span>&gt;</span>2009-09-22T15:49:12<span>&lt;/</span><span>LAST_SCHEMA_UPDATE</span><span>&gt;
      &lt;</span><span>LAST_DATA_UPDATE</span><span>&gt;</span>2010-01-15T13:41:18<span>&lt;/</span><span>LAST_DATA_UPDATE</span><span>&gt;
      &lt;</span><span>DESCRIPTION</span><span>&gt;</span>Cube1<span>&lt;/</span><span>DESCRIPTION</span><span>&gt;
      &lt;</span><span>IS_DRILLTHROUGH_ENABLED</span><span>&gt;</span>true<span>&lt;/</span><span>IS_DRILLTHROUGH_ENABLED</span><span>&gt;
      &lt;</span><span>IS_LINKABLE</span><span>&gt;</span>true<span>&lt;/</span><span>IS_LINKABLE</span><span>&gt;
      &lt;</span><span>IS_WRITE_ENABLED</span><span>&gt;</span>false<span>&lt;/</span><span>IS_WRITE_ENABLED</span><span>&gt;
      &lt;</span><span>IS_SQL_ENABLED</span><span>&gt;</span>true<span>&lt;/</span><span>IS_SQL_ENABLED</span><span>&gt;
      &lt;</span><span>CUBE_CAPTION</span><span>&gt;</span>Cube1<span>&lt;/</span><span>CUBE_CAPTION</span><span>&gt;
      &lt;</span><span>CUBE_SOURCE</span><span>&gt;</span>1<span>&lt;/</span><span>CUBE_SOURCE</span><span>&gt;
    &lt;/</span><span>row</span><span>&gt;
  &lt;/</span><span>root</span><span>&gt;
&lt;/</span><span>return</span><span>&gt;</span>
</pre>

<p><a href="http://11011.net/software/vspaste"></a></p>
]]></content:encoded></item><item><title>Sync Framework Power Pack for SQL Azure CTP</title><link>http://www.cenonsolutions.com/2010/1/13/sync-framework-power-pack-for-sql-azure-ctp</link><pubDate>Wed, 13 Jan 2010 13:54:49 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/13/sync-framework-power-pack-for-sql-azure-ctp</guid><content:encoded><![CDATA[ 
<p><a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=bce4ad61-5b76-4101-8311-e928e7250b9a">
Microsoft Sync Framework Power Pack for SQL Azure November CTP</a>
is a set of tools to integrate the MS Sync Framework into Visual
Studio 2008 Pro SP1 and SQL Server.</p>

<p>The tools in the power pack include:</p>

<ul>
<li>SqlAzuerSyncProvider database provider</li>

<li>SQL Azure Offline Visual Studio Plug-in</li>

<li>SQL Azure Data Sync Tool for SQL Server</li>

<li>SQL Azure Events</li>

<li>Automated Provisioning</li>
</ul>

<p>Before installing the power pack please ensure you have the
Microsoft Sync Framework 2.0 SDK found <a
href="http://www.microsoft.com/downloads/info.aspx?na=40&amp;p=3&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=bce4ad61-5b76-4101-8311-e928e7250b9a&amp;u=http%3a%2f%2fwww.microsoft.com%2fdownloads%2fdetails.aspx%3fFamilyID%3d89adbb1e-53ff-41b5-ba17-8e43a2e66254%26displaylang%3den">
here</a> installed.</p>
]]></content:encoded></item><item><title>IE Application Compatibility VPC</title><link>http://www.cenonsolutions.com/2010/1/13/ie-application-compatibility-vpc</link><pubDate>Wed, 13 Jan 2010 12:52:08 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/13/ie-application-compatibility-vpc</guid><content:encoded><![CDATA[ 
<p>Microsoft has release version 4.2 of its Internet Explorer
Application Compatibility VPC Image which is a collection of
Virtual PC virtual disk images for testing website with different
Internet Explorer version on Windows XP and Windows Vista.</p>

<p>5 VPCs are available for download <a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef">
here</a> including:</p>

<ul>
<li>Windows XP SP3 with IE6</li>

<li>Windows XP SP3 with IE7</li>

<li>Windows XP SP3 with IE8</li>

<li>Windows Vista with IE7</li>

<li>Windows Vista with IE8</li>
</ul>

<p>The latest version of Virtual PC can be downloaded for free <a
href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx">
here</a>.</p>
]]></content:encoded></item><item><title>SQL Server Data Warehousing Tips</title><link>http://www.cenonsolutions.com/2010/1/13/sql-server-data-warehousing-tips</link><pubDate>Wed, 13 Jan 2010 09:47:00 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/13/sql-server-data-warehousing-tips</guid><content:encoded><![CDATA[ 
<ol>
<li>If a table is larger than 50 Gb, partition it.</li>

<li>Create indexed views that are aligned with your partitioned
fact tables.</li>

<li>If time is available, rebuild statistics after every load of
data into the warehouse.</li>

<li>Use the correct date / time data type.&nbsp; Use date instead
of datetime when you do not need to store the time.</li>

<li>Use PAGE compression to reduce data volume and speed up
queries.</li>

<li>Use MOLAP write back instead of ROLAP write back.</li>

<li>Use Analysis Services backup instead of file copy.</li>

<li>For report performance, do as much in the query as possible
including return only the level of detail displayed, filter,
grouping, and sorting.</li>

<li>Keep the report server catalog on the same computer as the
reporting server.</li>

<li>Place the reporting services on a different server from the
data warehouse.</li>
</ol>
]]></content:encoded></item><item><title>Migrate from MySQL to SQL Server</title><link>http://www.cenonsolutions.com/2010/1/13/migrate-from-mysql-to-sql-server</link><pubDate>Wed, 13 Jan 2010 09:12:12 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/13/migrate-from-mysql-to-sql-server</guid><content:encoded><![CDATA[ 
<p>Microsoft released on January 7th the first CTP of a SQL Server
Migration Assistant for MySQL.&nbsp; The tool provides an
assessment of migration efforts as well as automates schema and
data migration from MySQL 4.1, 5.0, and 5.1 to SQL Server and SQL
Azure.</p>

<p>2 versions are available, one for any edition of SQL 2005 and
another for any edition of SQL 2008.&nbsp; Both require a license
key for activation which can be obtained after registering.&nbsp;
Toolkits for <a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=3e8722ae-77f3-4288-906d-f421e24d322f">
Oracle</a>, <a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=4fc68b67-149f-4237-8869-e70b68947f4f">
Sybase</a>, <a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=133b59c2-c89c-4641-bebb-6d04476ec1ba">
Access</a>, and <a
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=ad09f718-7d6f-499b-8a6a-0ea98e0c0295">
PowerBuilder</a> are also available.</p>

<p>The Microsoft SQL Server Migration Assistant 2008 for MySQL CTP
can be downloaded <a
href="http://www.microsoft.com/downloads/details.aspx?FamilyID=0e6168b0-2d0c-4076-96c2-60bd25294a8e&amp;displaylang=en">
here</a>.</p>

<p>The Microsoft SQL Server Migration Assistant 2005 for MySQL CTP
can be downloaded <a
href="http://www.microsoft.com/downloads/details.aspx?familyid=C6F14640-DA22-4604-AAAA-A45DE4A0CD4A&amp;displaylang=en">
here</a>.</p>
]]></content:encoded></item><item><title>Create Index in Teradata</title><link>http://www.cenonsolutions.com/2010/1/8/create-index-in-teradata</link><pubDate>Fri, 08 Jan 2010 15:04:11 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/8/create-index-in-teradata</guid><content:encoded><![CDATA[ 
<p>To create an Index in Teradata, use the following syntax:</p>

<p><span>CREATE</span> [<span>UNIQUE</span>] <span>INDEX</span>
&lt;<span>index_name</span>&gt;<br />
(&lt;<span>column_names</span>)<br />
<span>on</span> &lt;<span>table_name</span>&gt;;</p>

<p><a href="http://11011.net/software/vspaste"></a></p>
]]></content:encoded></item><item><title>Create Table in Teradata</title><link>http://www.cenonsolutions.com/2010/1/8/create-table-in-teradata</link><pubDate>Fri, 08 Jan 2010 14:56:45 GMT</pubDate><guid>http://www.cenonsolutions.com/2010/1/8/create-table-in-teradata</guid><content:encoded><![CDATA[ 
<p>To create a table in Teradata, use the following syntax.</p>

<pre class="code">
<span>CREATE TABLE</span> &lt;<span>schema</span>&gt;.&lt;<span>table_name</span>&gt;
(
    &lt;<span>column_name</span>&gt; &lt;<span>data_type</span>&gt; &lt;<span>column_attributes</span>&gt;
)
&lt;column_constraints&gt;
</pre>

<p>Data types may be one of the following:</p>

<table border="1" cellspacing="0" cellpadding="2"
style="width: 400px;">
<tbody>
<tr>
<td width="133" valign="top">INTEGER</td>
<td width="133" valign="top">INTERVAL YEAR [(n)]</td>
<td width="133" valign="top">INTERVAL SECOND [(n,[m])]</td>
</tr>

<tr>
<td width="133" valign="top">SMALLINT</td>
<td width="133" valign="top">INTERVAL YEAR [(n)] TO MONTH</td>
<td width="133" valign="top">CHAR [(n)]</td>
</tr>

<tr>
<td width="133" valign="top">BYTEINT</td>
<td width="133" valign="top">INTERVAL MONTH</td>
<td width="133" valign="top">VARCHAR(n)</td>
</tr>

<tr>
<td width="133" valign="top">DATE</td>
<td width="133" valign="top">INTERVAL DAY [(n)]</td>
<td width="133" valign="top">CHAR VARYING(n)</td>
</tr>

<tr>
<td width="133" valign="top">REAL</td>
<td width="133" valign="top">INTERVAL DAY [(n)] TO HOUR</td>
<td width="133" valign="top">LONG VARCHAR</td>
</tr>

<tr>
<td width="133" valign="top">DOUBLE PRECISION</td>
<td width="133" valign="top">INTERVAL DAY [(n)] TO MINUTE</td>
<td width="133" valign="top">BYTE [(n)]</td>
</tr>

<tr>
<td width="133" valign="top">FLOAT [n]</td>
<td width="133" valign="top">INTERVAL DAY [(n)] TO SECOND</td>
<td width="133" valign="top">VARBYTE(n)</td>
</tr>

<tr>
<td width="133" valign="top">DECIMAL [(n[,m])]</td>
<td width="133" valign="top">INTERVAL HOUR [(n)]</td>
<td width="133" valign="top">GRAPHIC[(n)]</td>
</tr>

<tr>
<td width="133" valign="top">DATE</td>
<td width="133" valign="top">INTERVAL HOUR [(n)] TO MINUTE</td>
<td width="133" valign="top">VARGRAPHIC(n)</td>
</tr>

<tr>
<td width="133" valign="top">TIME [(n)] [WITH TIME ZONE]</td>
<td width="133" valign="top">INTERVAL HOUR [(n)] TO SECOND</td>
<td width="133" valign="top">LONG VARGRAPHIC</td>
</tr>

<tr>
<td width="133" valign="top">TIMESTAMP [(n)] [WITH TIME ZONE]</td>
<td width="133" valign="top">INTERVAL MINUTE [(n)]</td>
<td width="133" valign="top">&nbsp;</td>
</tr>

<tr>
<td width="133" valign="top">INTERVAL</td>
<td width="133" valign="top">INTERVAL MINUTE [(n)] TO SECOND
[(m)]</td>
<td width="133" valign="top">&nbsp;</td>
</tr>
</tbody>
</table>

<p>&nbsp;</p>

<p>Column attributes may be one of the following:</p>

<table border="1" cellspacing="0" cellpadding="2"
style="width: 400px;">
<tbody>
<tr>
<td width="133" valign="top">NOT NULL</td>
<td width="133" valign="top">NAMED <em>name</em></td>
<td width="133" valign="top">DEFAULT NULL</td>
</tr>

<tr>
<td width="133" valign="top">UPPERCASE</td>
<td width="133" valign="top">DEFAULT <em>number</em></td>
<td width="133" valign="top">WITH DEFAULT</td>
</tr>

<tr>
<td width="133" valign="top">[NOT] CASESPECIFIC</td>
<td width="133" valign="top">DEFAULT USER</td>
<td width="133" valign="top">CHARACTER SET</td>
</tr>

<tr>
<td width="133" valign="top">FORMAT <em>quote_string</em></td>
<td width="133" valign="top">DEFAULT DATE</td>
<td width="133" valign="top">&nbsp;</td>
</tr>

<tr>
<td width="133" valign="top">TITLE <em>quote_string</em></td>
<td width="133" valign="top">DEFAULT TIME</td>
<td width="133" valign="top">&nbsp;</td>
</tr>
</tbody>
</table>

<p>&nbsp;</p>

<p>Column constraints may be one of the following:</p>

<ul>
<li>PRIMARY KEY</li>

<li><em>Ex: UNIQUE PRIMARY INDEX(&lt;column_names&gt;)</em></li>

<li>UNIQUE</li>

<li><em>Ex: UNIQUE INDEX(&lt;column_names&gt;)</em></li>

<li>CHECK (<em>boolean_expression</em>)</li>

<li><em>Ex: CHECK (&lt;column_name&gt; = 'F' OR &lt;column_name&gt;
= 'M')</em></li>

<li>FOREIGN KEY (column_name_list)</li>

<li><em>Ex: FOREIGN KEY (&lt;column_names&gt;)</em></li>

<li>REFERENCES tablename [(column_name_list)]</li>

<li><em>Ex: REFERENCES &lt;table_name&gt;
(&lt;column_names&gt;)</em></li>
</ul>
]]></content:encoded></item></channel></rss>

