#DateForumTypeThreadPost
3723 Aug 2012 @ 02:25 PDTDatabaseReplyIF condition in bteq Probably you can look into this manual... http://www.teradataforum.com/teradata_pdf/b035-2414-062a.pdf
3603 Aug 2012 @ 03:13 PDTDatabaseReplyFailure 2620 The format or data contains a bad character I guess there are three problems in your SQL 1. As specified by Ulrich & Dieter, it seems like Sales_Amt or Tax_Amt is NULL and caz you are returning character data '#@@#' in cas...
3531 Jul 2012 @ 09:34 PDTDatabaseReplyhow does compress work in tables COMPRESSION is a teradata feature which allows the users to compress the most commonly appearing values in once column. Physically, the compressed values are stored in table header and not reape...
3431 Jul 2012 @ 08:51 PDTDatabaseReplyQualify Rank Over Partition By RANK basically assigns a sequential numeric identifier to each row depending on the criteria mentioned in OVER(...) clause OVER defines the criteria based on which the sequential numbers are...
3330 Jul 2012 @ 04:41 PDTDatabaseReplySize of partitions and PPI performance Adding the new partition is done through MODIFY PRIMARY INDEX(...) statement, and once the primary idex is changed the data will be re-distributed accordingly. So yes the data present in NORANGE...
3228 Jul 2012 @ 04:35 PDTDatabaseReplyStored Procedure - Variable flexibility Unfortunately you are dealing with PL/SQL, if this would have been any other coding language then you could have easily used the arrays to fix your problem, but this won't be the case in SP ...
3128 Jul 2012 @ 04:25 PDTDatabaseReplycase statement on join condition. Yes, you can have a CASE statement in JOINing condition because all the case statements return scalar values, so shouldn't be a problem. I think your first query should execute without any e...
3028 Jul 2012 @ 05:19 PDTDatabaseReplyProcedures Permissions A user can create a stored procedure in its own space or in some other DB, so the owner of the stored procedure could be different from the creator of the stored procedure. So whenever the s...
2927 Jul 2012 @ 01:39 PDTDatabaseReplyProcedures Permissions The procedure database needs to have the update access on table db. You can grant the access through this sql. GRANT UPDATE ON <<TABLE_DB>> TO <<PROCEDURE_DB>> WITH G...
2825 Jul 2012 @ 02:51 PDTAnalyticsReplyCoverting Char to Date Yes, but you might need to cast the parameter to a proper data format.
2724 Jul 2012 @ 07:21 PDTDatabaseReplyCreating a fixed width text file Sometimes you face this issue if the data contains unicode characters. Does your data contain any unicode characters?
2624 Jul 2012 @ 03:13 PDTAnalyticsReplyINSERT SELECT and other values Encapsulate the SQL query in the commas and treat it as a string... Insert into dbc.xxx (a,b,c) values ('select * from abc',null,null)
2518 Jul 2012 @ 11:14 PDTGeneralReplyTuning the query Use the query that I mentioned above   SELECT HASHAMP(HASHBUCKET(HASHROW(<<NUPI Columns))) AS "AMP #",COUNT(*) FROM <<table>> GROUP BY 1 ORDER BY 2 ...
2418 Jul 2012 @ 11:10 PDTDatabaseReplyStats on partition on a no partitioned table Excellent Share!
2318 Jul 2012 @ 11:09 PDTDatabaseReplyStored Procedures - Need help with massaging data within an input parameter As PL/SQL is allowed in Stored Procedure, so you can take the input parameter and by doing the string operations to split the results and insert them in the table. You will need to use the I...
2218 Jul 2012 @ 10:56 PDTGeneralReplyquery tuning I can see a lot of 'low confidence' and 'no confidence' clauses in the EXPLAIN PLAN... Have the STATS been collected on the joining column and index columns?
2118 Jul 2012 @ 10:45 PDTGeneralReplyTuning the query Skewness is related to the way the data is distributed across the AMPS, and its the INDEX selection that defines the data distribution... PARTITION doesn't have to do anything with the d...
2018 Jul 2012 @ 03:47 PDTDatabaseReplyHow to know last one hour transation what you did on the teradata database You need to check the DBQL Log tables, they track the SQLs that has been executed on the system and you can put a filter on the user for which you want to see the results. SELECT * FROM DBC....
1917 Jul 2012 @ 04:19 PDTDatabaseReplyinsert range of values in a table You can try this SQL SEL CSUM(1,1) + 1090 AS SEQ FROM SYS_CALENDAR.CALENDAR QUALIFY SEQ < 9000 This will give you the required sequence number, you can include this query in a subque...
1817 Jul 2012 @ 04:07 PDTDatabaseReplyNew to Teradata - Update a table with another records in same table You need to check whether the STATE, ACCOUNT_ID, MEMBER_ID, DURATION combination is unique or not across the table. SEL STATE, ACCOUNT_ID, MEMBER_ID, DURATION, COUNT(*) AS CNT FROM SCHEMA_TA...
1717 Jul 2012 @ 12:23 PDTDatabaseReplyConcatanation of the rows from one columns While concatenating, if you are restricted to use the comma delimiter then you can probably do a string operation on the table and change the comma delimiter to pipe or some other one in the NAM...
1617 Jul 2012 @ 12:17 PDTDatabaseReplyHelp defining Partition You can probably use a different table to generate a new surrogate key value against the IDs of the company_id / party_id. You can mark this newly generated surrogate key as the PI in this table...
1517 Jul 2012 @ 12:10 PDTDatabaseReplyNew to Teradata - Update a table with another records in same table so the problem fixed?
1416 Jul 2012 @ 03:57 PDTDatabaseReplyNew to Teradata - Update a table with another records in same table It seems like there are duplicate values in the DURATION column. From the sample data I assumed that the DURATION column has unique values. You can include the other columns in the WHERE cla...
1316 Jul 2012 @ 12:36 PDTDatabaseReplyNew to Teradata - Update a table with another records in same table Try this SQL UPDATE T1 FROM SCHEMA.TABLE T1, SCHEMA.TABLE T2 SET PRODUCT_FROM = T2.PRODUCT_TO WHERE T1.DURATION = T2.DURATION + 1 Good luck!

Pages