|
Archives of the TeradataForumMessage Posted: Thu, 01 Aug 2013 @ 15:59:48 GMT
<-- Anonymously Posted: Thursday, August 01, 2013 09:18 --> Hello All, I'm trying to extract the partition expression from dbc.indexcontraints as a part of my need to reconstruct table DDL after generating compress expressions for each column. However, I have been unsuccessful as the expression is stored with a lot of extra braces and with 'check', using which I'm unable to generate an executable partitioning expression. Please let me know if you have met with any success My partitioning expression looks like below: PARTITION BY ((MAINT_COST_TYPE_BM ) BETWEEN 1 AND 65535) However this fails- as it probably expects range_n or something of that sort. I'm unable to get rid of all the braces because TD has no text replacement functions like oreplace and my DBA is not ready to install it. Part of the query I have been using : SEL databasename, tablename,constraintText, CAST(SUBSTR(constraintText,7) AS VARCHAR(4000)) PPI FROM DBC.IndexConstraints Many thanks!
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||