#DateForumTypeThreadPost
11210 Oct 2012 @ 12:11 PDTDatabaseReplyPrimary Index on VARCHAR columnNo there won't be any difference as both the data types belong to text domain.
11109 Oct 2012 @ 02:12 PDTToolsReplyBTEQ data format question/DATE format issueAshwin, Try this... SELECT '9999-12-31 23:59:59', CAST('9999-12-31 23:59:59' AS TIMESTAMP(0) FORMAT 'YYYY-MM-DDBHH:MI:SS')
11009 Oct 2012 @ 09:23 PDTDatabaseReplyre:spool spaceYour understanding is correct! If the required spool space for a USER's query on one AMP is less than what is currently available then TD can't hold the intermediate results in spool and th...
10904 Oct 2012 @ 01:40 PDTDatabaseReplyHow to force duplication of the rows from a small table on all AMPsHi Ayush, In that case the join will cost more as you are joining two non-index columns. TD will be redistributing the data for both of the tables on the joining columns to make sure that the data...
10804 Oct 2012 @ 12:26 PDTDatabaseReplyHow to force duplication of the rows from a small table on all AMPsHi Ayush, The reason that your tablea is redistributed is because the join is on UPI and no index. TableA has a three columns NUPI, and in the join condition you are only using one column, so basi...
10704 Oct 2012 @ 12:16 PDTDatabaseReplyconvert string to date format SELECT '8/12/2012' AS COL1 , CAST(CASE WHEN CHAR_LENGTH(SUBSTRING(COL1 FROM 1 FOR POSITION('/' IN COL1)-1))=1 THEN '0'||SUBSTRING(COL1 FROM 1 FOR POSITION('/' IN...
10604 Oct 2012 @ 04:38 PDTDatabaseReplyCompile Stored Procedures in Batchfor example?
10503 Oct 2012 @ 05:19 PDTDatabaseReplyconvert string to date formatYou can check the length of the date string and convert it accordingly... SELECT '8/12/2012' AS COL1 , CASE WHEN CHAR_LENGTH(COL1) = 9 THEN CAST('0'||COL1 AS DATE FORMAT '...
10403 Oct 2012 @ 02:01 PDTDatabaseReplyCREATE TABLE Failed. 3933: The Maximum Possible Row Length in the Table is too Large.In Teradata, the maximum row size is approx 64K bytes. The table definition already contains one column of 62K bytes plus some other columns (which are not commented) and the size of the expected r...
10303 Oct 2012 @ 01:54 PDTDatabaseReplyconvert string to date format SELECT '8/12/2012' COL1, CAST('0'||COL1 AS DATE FORMAT 'DD-MM-YYYY')
10203 Oct 2012 @ 10:40 PDTGeneralReplyTable exists and shows in dbc.tablesize but not showing in dbc.tablesencapsulate the table name in quotes... It will work Create table "test,tbl" ...
10103 Oct 2012 @ 08:35 PDTGeneralReplyIs automation worth for cleaning Orphan Rights and Leftover Spool?Its a good practice to have an automated check on multiple things like access rights, user logging in time etc. This helps you to make sure that system takes care of the left overs and is in good s...
10001 Oct 2012 @ 08:59 PDTDatabaseReplyWhy Teradata is Costly for Aggregation Operations?I guess its not! Do you have some comparison stats against any other DB to drive this analogy?
9901 Oct 2012 @ 08:03 PDTDatabaseReplyUnderstanding PPI Its a very generic question and it totally matters on the demographics of the data and the way it is queried. The queries performance increases if the query is doing partition elimination, but if y...
9830 Sep 2012 @ 10:51 PDTDatabaseReplyOptimize Data Dictionary QueriesThis is a strange behavior and must be frustrating. Are you the only one facing this issue or any one else is facing the same issue? Has the DBA applied some TASM settings which might be putting y...
9730 Sep 2012 @ 10:12 PDTDatabaseReplySlow left join queryYou didn't mention which index types have been defined on the columns. Anyways, table2.sub_sk doesn't have any index? The first step of the explain that you shared mentions that table2 is ...
9629 Sep 2012 @ 01:17 PDTDatabaseReplyThe product of the number of partitions at each level exceeds 65535.I think you shouldn't be receiving the error as your partitions will be within the allowed limit. The total partitions created will be (364 + 364 + 364 +364 + 30) * (44) = 65384. So I guess ...
9529 Sep 2012 @ 12:44 PDTDatabaseReplyConverting rows to columns in Teradata sql To understand the problem completely and to suggest a solution, I guess its important to know how many distinct ID values can possibly be for a MEMBER, and how many distinct possible VALUE can exis...
9429 Sep 2012 @ 12:33 PDTToolsReplySize Limit on Varchar / ConcatenatingOn an ASCII character set, the Maximum size of a varchar could be 64K because of the maximum row size. Your character set seems to be UNICODE where each character takes 2 bytes for storage...
9328 Sep 2012 @ 01:03 PDTDatabaseReplyCount rows once where value appeatrs in one or more columnsHere you go... SEL COALESCE(COL1, COL2, COL3) as _USER, count(*) FROM T WHERE _USER IS NOT NULL GROUP BY 1
9228 Sep 2012 @ 09:27 PDTDatabaseReplySlow left join queryWhat are the Indexes on those tables? Are the stats refreshed? Can you share the explain plan of the query?
9128 Sep 2012 @ 09:23 PDTDatabaseReplyCount rows once where value appeatrs in one or more columnsTry this SQL SEL COUNT(COALESCE(COL1, COL2, COL3)) FROM T
9028 Sep 2012 @ 06:45 PDTDatabaseReplyShow Whole Business WeekDo a Right outer join with sys_calendar.calendar. Something like this... SEL A.Company, B.Date, A.Sales FROM tabl_calendar_date A RIGHT OUTER JOIN sys_calendar.Calendar B ON A.Date = B.Calend...
8926 Sep 2012 @ 03:28 PDTGeneralReplyPosting topics into the correct forumYou should be able to see the results in BTEQ output, SQLA are limited to only showing peoper table format results. Subtotals adds additional rows with limited contents only and thus are skipped by...
8826 Sep 2012 @ 03:14 PDTDatabaseReplyJARO_WINKLER_SIMILARITY Function for Teradata?No I don't thik there is any such function in Teradata that returns the similarity comparison of two strings. But I think the algorithm of this function can be implemented in a UDF.

Pages