﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / How This code works? / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Fri, 05 Sep 2008 10:31:47 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How This code works?</title><link>http://www.teradata.com/teradataforum/Topic9945-9-1.aspx</link><description>Thanks for  your replyMany ThanksVedamurthy</description><pubDate>Tue, 04 Dec 2007 23:52:33 GMT</pubDate><dc:creator>vedamurthy GY</dc:creator></item><item><title>RE: How This code works?</title><link>http://www.teradata.com/teradataforum/Topic9945-9-1.aspx</link><description>First it is finding the starting position of substring 'BETWEEN DATE' using index function then adding 13 to get the starting position of the first Date range , then reading 12 characters from there to get the DATE value.Same technique for the other column.</description><pubDate>Tue, 04 Dec 2007 10:06:54 GMT</pubDate><dc:creator>Somesh</dc:creator></item><item><title>How This code works?</title><link>http://www.teradata.com/teradataforum/Topic9945-9-1.aspx</link><description>Hi folks,This code is used for finding the  start and end date of the partition, constrainttext  is a column in a DBC veiw table. let me know why should they added 13 and -37select          substring               (                constrainttext                 FROM index(constrainttext,'BETWEEN DATE') +13                 FOR 12               ),        substring               (                constrainttext                 FROM index(constrainttext,'NO RANGE') -37                 FOR 12               )from dbc.indexconstraintswhere databasename = 'travel'and tablename = 'branch_item'Result:returns the overall partition from and to dates'2003-08-03'	'2005-12-31'ThanksVedamurthy</description><pubDate>Tue, 04 Dec 2007 02:42:29 GMT</pubDate><dc:creator>vedamurthy GY</dc:creator></item></channel></rss>