<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.1" -->
<rss version="0.92">
<channel>
	<title>Teradata Tips Info</title>
	<link>http://www.teradatatips.info</link>
	<description>Teradata Tips and Information</description>
	<lastBuildDate>Thu, 04 Jun 2009 01:51:30 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>TeradataTip6 &#8211; Let the database recommend which statistics to collect</title>
		<description><![CDATA[Teradata uses statistics to determine the most efficient query plan. Sometimes it is difficult to decide which statistics to collect. Collecting statistics requires a full table scan and you don&#8217;t want to do it unnecessarily, but not collecting the required statistics can lead to inefficient queries and increased resource consumption.
The following technique lets Teradata tell [...]]]></description>
		<link>http://www.teradatatips.info/?p=43</link>
			</item>
	<item>
		<title>TeradataTip5 &#8211; How to find join indexes defined on your table</title>
		<description><![CDATA[If you try to drop or mload a table that has a join index defined on it, Teradata will give you an error:

5467:  Cannot drop or MLOAD a table with join or hash indexes.

To find the join indexes that are defined on your table, run the following query:

SELECT  * FROM dbc.indices 
WHERE indextype='J'
 [...]]]></description>
		<link>http://www.teradatatips.info/?p=39</link>
			</item>
	<item>
		<title>TeradataTip4 &#8211; convert an integer-based time to a time(0), and convert a DATE,INTEGER to a timestamp(0)</title>
		<description><![CDATA[Teradata has two types of time types, the old one that is simply an integer format &#8216;99:99:99&#8242; and the new ANSI TIME type. The integer-based one can be used for comparisons but not for time calculations. The new one can be used for everything. This is how you can convert to the new type if [...]]]></description>
		<link>http://www.teradatatips.info/?p=33</link>
			</item>
	<item>
		<title>TeradataTip3 &#8211; Combine date and time into a timestamp</title>
		<description><![CDATA[
CREATE TABLE T&#40; dt date, tm time&#40;0&#41;&#41;;
&#160;
INSERT INTO T VALUES &#40;date '2009-05-28', time '14:53:45'&#41;;
&#160;
SELECT dt, tm,
    cast&#40;  dt AS timestamp&#40;0&#41;&#41; +
            &#40;tm - time '00:00:00' hour TO second&#41; ts
 FROM T;

        dt  [...]]]></description>
		<link>http://www.teradatatips.info/?p=30</link>
			</item>
	<item>
		<title>TeradataTip2 &#8211; How much space are my tables using?</title>
		<description><![CDATA[Use this to find out how much perm space the tables in a specific database are using in megabytes:

SELECT tablename,sum&#40;currentperm&#41;/1024/1024 MB
FROM dbc.allspace
WHERE databasename='your_database_name'
GROUP BY 1
ORDER BY 2 DESC;

]]></description>
		<link>http://www.teradatatips.info/?p=16</link>
			</item>
	<item>
		<title>TeradataTip1 &#8211; Casting decimal(n) to varchar without extra characters</title>
		<description><![CDATA[To convert a decimal(n) value to a simple string containing only digits, use this:

SELECT
  cast&#40; cast&#40; d AS format 'Z(I)' &#41; AS varchar&#40;30&#41; &#41;
FROM T;

Why do you need the double cast? Well, if you try to convert from a column that has a decimal(n) to a numeric string and you simply cast to a [...]]]></description>
		<link>http://www.teradatatips.info/?p=4</link>
			</item>
</channel>
</rss>
