#DateForumTypeThreadPost
260311 Feb 2014 @ 12:36 PSTDatabaseReplyHighest three averagesHi Jack, the Select is syntactically valid, can you show your SQL and the exact error message? Which client do you use?
260211 Feb 2014 @ 12:30 PSTDatabaseReplyAccount ID and Performance GroupHi Kishore, in dbc.DBQLogTbl you'll find WDID, FinalWDID and SessionWDID, some TDWM related views like QryLogTDWMV rerurns those columns.
260110 Feb 2014 @ 11:44 PSTDatabaseReplydynamic index collect stats statementHi Joe, as Raja mentioned, there's an undocumented udfconcat function in the TD14 tdstats database, you just have to add a Group By as it's an aggregate UDF. My StatsInfo view return...
260010 Feb 2014 @ 12:28 PSTDatabaseReplyHighest three averagesHi Jack, you get the three most recent weeks using OLAP functions: select wn, pid, avg(score) as avgscore from scores group by wn, pid qualify rank() over (partition by pid order by wn desc...
259910 Feb 2014 @ 09:35 PSTDatabaseReplyDBQL SQLTextInfo 3577: row size or sort key size overflowHi Luca, you need to CAST the result of the oReplace to a shorter VarChar, in TD14 it's VARCHAR(8000) UNICODE.   Or you use TO_CHAR to switch comma and period: TO_CHAR(x, '9999D99&...
259810 Feb 2014 @ 09:13 PSTToolsReplySkip header row of file using TDLoadHi Manjeeth, i didn't test it, but you might try to put it in a job variable file and use this with the -j option. 
259710 Feb 2014 @ 08:36 PSTDatabaseReplyInformatica PowerCenter and Teradata - Conflicting data length for columnHi Caroline, it's not Teradata, but you should have mentioned that it's a TPT error :-) TPT is picky about correct length definition, at least when you define an input file. I don't ...
259610 Feb 2014 @ 08:03 PSTUDAReplyCast and format Hi Seneg, don't apologize, I'm german and my french is worse than your english :-) The format doesn't help because the comma is used as a thousand separator. If you're on TD14 yo...
259510 Feb 2014 @ 07:47 PSTDatabaseReplyInformatica PowerCenter and Teradata - Conflicting data length for columnHi Caroline, this is not a Teradata restriction, source and target length does not have to match, it must be PowerCenter related. In a Teradata mode session Teradata happily inserts 20 characters...
259410 Feb 2014 @ 07:23 PSTDatabaseReplyGenerating Surrogate Key Using ROWNUMOLAP functions redistribute the rows from spool 1 to spool 2, so all rows are kept in spool twice. If you have large rows you might try to calculate the sequence using the PK columns only and then...
259310 Feb 2014 @ 07:10 PSTDatabaseReplyGenerate SurrogateKey with a huge tableHi Adeel, did you check DBQL for resources used? SUM(1) or COUNT(*) OVER (ROWS UNBOUNDED PRECEDING) (without PARTITION BY) should be worse than ROW_NUMBER: There will be an implicit ORDER B...
259209 Feb 2014 @ 11:37 PSTDatabaseReplyDifference between DBQL AMPCPUTime and Acctg CPUHi Velu, even if you log all SQL in DBQL the resource usage of the last step of an aborted query will be missing (afaik 14.10 should fix this). Assuming you have Account String Expansion on day/h...
259109 Feb 2014 @ 11:29 PSTTeradata ApplicationsReplyBad character in format or dataWhen you try to cast the string 'null' to a Decimal, of course this fails. You have to add NULLIF to all numeric columns: NULLIF(:f12, 'null')
259009 Feb 2014 @ 11:26 PSTToolsReplyBTEQ and the Commit statementSQL Assistant automatically adds a COMMIT to each request in an ANSI session (you can easily verify that when you look at DBQL) unless you use .BeginTx/.CommitTx BTEQ never autocommits, if you don...
258909 Feb 2014 @ 06:07 PSTDatabaseReplyGROUP BY Processing in TD 14Since TD13 there are multiple algorithms to do aggregation, some are indicated in Explain by "skippiong local/global cache", etc. Plus the optimizer automatically decides if DISTINCT or ...
258809 Feb 2014 @ 06:02 PSTToolsReplySkip header row of file using TDLoadIn newer releases of TPT there's a SkipRows/SkipRowsEveryFile option.
258709 Feb 2014 @ 05:59 PSTDatabaseReplyDate duration issueThere was a similar question a few days ago (same company?) Data Caclulation (Number of Full Months and remaining Days between two dates) Try to add the number of months to the start date or subs...
258609 Feb 2014 @ 05:51 PSTToolsReplyBTEQ examplesSimply redirecting errors should work: bteq < myfile > mylog.log 2> myerrors.log And within BTEQ there .SET ERROROUT to switch from STDOUT to STDERR 
258509 Feb 2014 @ 05:35 PSTDatabaseReplyHow to filter NULL from the macro outputCan you show some example data and what you want for result (and why)? Of course you get only NULLs when you don't have a row in d matching both 1 and 'mca' and select only columns fro...
258408 Feb 2014 @ 08:24 PSTToolsReplyInstalling BTEQ on SolarisThere's no public download for the Solaris TTU via DevEx, you must be a Teradata customer to get it. You need to logon to the Teradata @ Your Service patch server at tays.teradata.com
258307 Feb 2014 @ 07:30 PSTDatabaseReplyRanking the values ignoring duplicatesAnd if you're not on TD14.10, yet, you might use a workaround: Missing Functions: DENSE_RANK
258205 Feb 2014 @ 01:22 PSTToolsReplyData Caclulation (Number of Full Months and remaining Days between two dates)Why do you want 19 days for your first example and 26 for #2? Based on the start date #2 should result in 27 days? You can get the month with a CASE like CASE WHEN EXTRACT (DAY FROM b)+1 >=...
258105 Feb 2014 @ 11:03 PSTDatabaseReplyTeradata lookup reference table/dataHi Sue, you can move the search strings in a table and then simply use x.CustName like any (SELECT pattern FROM tab) But this will result in a Product Join for each SELECT, so performance mig...
258005 Feb 2014 @ 10:47 PSTDatabaseReplyUse of NOT IN for a fact joinHi Nishchint, did you consider using a MERGE instead? Match on the logical PK and next_date and do an Insert only WHEN NOT MATCHED. This avoids the NOT IN and might do a direct merge without a sp...
257903 Feb 2014 @ 11:29 PSTDatabaseReplyFetching Account Info from DBC.DBQLRulesYou need to use AccountString instead of Account. ACCOUNT is a built-in function, which returns your current accountstring. Another common error is DATABASE vs. DatabaseName :-)    

Pages