#DateForumTypeThreadPost
250309 Jan 2014 @ 03:31 PSTDatabaseReplySimple Loading into table ( table to table Load)Your query tries to insert all rows from both tables DW2_INVST_TRAN and DW2_EVENT_XREF. INSERT INTO DW2_INVST_TRAN_R2 SELECT T1.* FROM DW2_INVST_TRAN T1 INNER JOIN DW2_EVENT_XREF T2...
250209 Jan 2014 @ 03:25 PSTGeneralReplyConnect by LevelHi Nihal, this query simply returns a list of integers between 1 and 10, you can easily get the same result with: select day_of_calendar as count1 from sys_calendar.calendar where day_of_cal...
250109 Jan 2014 @ 03:14 PSTDatabaseReplySQL helpHi Bob, no need to apologize :-) Rephrasing your condition: Find rows where the number of days between the current date and the date three rows before is less than or equal to seven. SELECT * ...
250008 Jan 2014 @ 03:18 PSTDatabaseReplyTeradata Spool issue in Recursive issueHi abhishek, you got denormalized input and want to create denormalized output? Ouch.
249908 Jan 2014 @ 01:27 PSTAnalyticsReplyCall a macro from a stored procedure?Hi Ratnam, you want to execute the SELECT found in query in BTEQ? .EXPORT FILE dynSQL.txt; SELECT query (TITLE '') FROM aquery_Table WHERE id = 1; .EXPORT RESET .RUN FILE dynSQL.txt;...
249808 Jan 2014 @ 01:01 PSTDatabaseReplySelect for stored procedures for parameters and return typesYou need dbc.ColumnsV: SELECT * FROM dbc.columnsv WHERE (DatabaseName, TABLENAME) IN ( SELECT DatabaseName, TABLENAME FROM dbc.TablesV WHERE TableKind = 'P')  
249708 Jan 2014 @ 08:38 PSTDatabaseReplyOREPLACE It's 8000: SELECT TYPE(OREPLACE('a', 'b', 'c')); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. Type(OREPLACE(...
249607 Jan 2014 @ 12:06 PSTDatabaseReplyConverting Number to CharacterWhat's your TD release? In TD14 there's a new FORMAT used for NUMBERs, the default FORMAT 'FN9' should work: CAST(svd AS NUMBER) / 1000 as div, CAST(div AS VARCHAR(50)) AS res ...
249506 Jan 2014 @ 11:59 PSTDatabaseReplySQL helpStrange, this should work as-is. Maybe the parser is a bit confused, try GROUP BY 1,2,3,4   Btw, what's your TD release?
249406 Jan 2014 @ 11:27 PSTGeneralReplyRecursive Query helpThere's no need for recursion, you just have to sort the data descending and then use RESET WHEN: SELECT col1, col2, MIN(CASE WHEN col3 IN ('activity typ 3', 'activity ...
249306 Jan 2014 @ 03:20 PSTDatabaseReplyMODE and FORMAT - TD Utilities.Hi Raj, again, those "unidentified things" are two bytes indicating the length of the resulting VarChar. This is a well-known problem with FExp, there's no built-in way to get delimi...
249206 Jan 2014 @ 03:13 PSTDatabaseReplyTeradata Spool issue in Recursive issueDid you ever run the SELECT on it's own?   IMHO there's no proper join-condition in the recursive part resulting in huge cross joins, you should check the result when you add a WHERE...
249105 Jan 2014 @ 04:50 PSTDatabaseReplySQL help SELECT card_number, merchant, EXTRACT(YEAR FROM trans_date) AS trans_year, EXTRACT(MONTH FROM trans_date) AS trans_month, trans_year * 12 + trans_month AS trans_ym, SUM(SUM(a...
249005 Jan 2014 @ 04:12 PSTConnectivityReplyUnable to login into TD Demo express Evaluation version 14.10Hi Kumar, did you install the TD Express 14.10 VMWare? Or just the 14.10. client? There's no more TD on windows, you need to use the VM's ip-address.   Login to a terminal window o...
248904 Jan 2014 @ 06:07 PSTDatabaseReplyMODE and FORMAT - TD Utilities.Hi Raj, the "unidentified things" are binary data like INT, which are no readable text. You can simply CAST any datatype to a CHAR to be able to use TEXT format.  But you didn'...
248804 Jan 2014 @ 02:25 PSTDatabaseReplyAccess Rights required to execute a FunctionThis error indicates that the function was not found, it's not related to access right. Did you qualify the function, dbname.HASH_MD5('ABCD')? A UDF is only found when it's in SYS...
248704 Jan 2014 @ 02:19 PSTDatabaseReplyMODE and FORMAT - TD Utilities.There's a manual for each Load Utility which describes FORMAT and MODE in full detail.
248602 Jan 2014 @ 10:00 PSTDatabaseReplyJoin two tables using like statementThe optimizer will not be forced to use a Product Join because there's another join condition T1.ColB = T2.ColB, thus the LIKE or SUBSTRING might be evaluated during the join. I would cha...
248530 Dec 2013 @ 10:21 PSTDatabaseReplyRun time explain plan for a queryThere will be no difference between an EXPLAIN and actually running the query. If you want to see the actual resource usage (CPU/IO/spool/etc.) you must check DBQL, especially dbc.QryLogStepsV (if...
248430 Dec 2013 @ 07:27 PSTDatabaseReplyCannot logon to the system - no access right to DBC.DatabaseVWhich client do you use to logon? Afaik you don't need access rights to dbc.DatabasesV (there's no dbc.DatabaseV, i assume it's a typo) to be able to logon. Usually SELECT on Database...
248330 Dec 2013 @ 04:00 PSTDatabaseReplyDatamartDatamarts are not specific to Teradata: http://en.wikipedia.org/wiki/Datamart
248230 Dec 2013 @ 03:31 PSTDatabaseReplyProblem with CASE WHEN statementHi Anu, the first WHEN in a CASE which evaluates to TRUE will be used, it's not doing a kind of best-match. The rule of thumb is to define the most restrictive condition first. You could rew...
248130 Dec 2013 @ 03:24 PSTDatabaseReplyGenerating Sequence Number when GROUP BY in the QueryHi Sagar, of course you can use RANK and aggregates in the same query, OLAP functions are calculated after GROUP BY/HAVING. You probably use the deprecated RANK(col) instead of RANK() OVER (ORDER...
248027 Dec 2013 @ 05:11 PSTToolsReplybteq blank SpacesYou can also switch to TPT, the latest releases added a VARTEXT output format without any CAST/TRIM.
247927 Dec 2013 @ 05:08 PSTAnalyticsReplyrun queries in parallel and serialA Multi Statement Request is one transaction, but the optimizer might run the indvidual statements in parallel. If you want to submit multiple requests in parallel you need multiple sessions, afai...

Pages