#DateForumTypeThreadPost
202805 Jul 2013 @ 01:30 PDTDatabaseReplyStored Procedures - Use dynamic cursor for any tableSorry, i don't get it. Could you rephrase your question? Is there any relation to the original question?    Dieter
202705 Jul 2013 @ 01:14 PDTDatabaseReplyCASESPECIFIC What is its purpose?To get a case insensitive result both operands must be NOT CASESPECIFIC. Any literal in an ANSI mode session is CASESPECIFIC by default, but NOT CS in a Teradata session. To get the desired resul...
202601 Jul 2013 @ 12:54 PDTGeneralReplyCasting in case statementYou need to cast only the date not the case: CASE WHEN OFR_STRT_DT='1900-01-01' THEN ‘NA’ ELSE CAST (OFR_STRT_DT as varchar (10) ) END as OFR...
202501 Jul 2013 @ 06:21 PDTDatabaseReplySQL Assistant inserts double quotesHi Nolan, i don't think that SQLA will add quotes, this is probably done by Excel itself. Similar when i cut&paste from SQLA to Excel, in some cases it's double quoting the query. &n...
202401 Jul 2013 @ 06:13 PDTDatabaseReplySequnce generated column in Volatile tableHi Bala, are those inserts single row or insert/selects?   Dieter
202301 Jul 2013 @ 06:12 PDTToolsReplyTPT - HELP COMMAND EXECUTION.AFAIK you can't do HELP in TPT. But why do you think you need it, it's just informational output?   Dieter
202201 Jul 2013 @ 06:10 PDTDatabaseReplyHow to get columns in collect statsDepends on your release: For TD14 you get it from dbc.StatsV, before it's in various dbc views (column/index/multicolumn-StatsV) or better try my stats query to get more details: http://devel...
202101 Jul 2013 @ 05:52 PDTDatabaseReplyMR and MS access rightsThey are used to control who can use the PM/API commands MONITOR SESSION/RESOURCE. Check the "Application Programming Reference" manual for details.   Dieter
202001 Jul 2013 @ 05:44 PDTDatabaseReplyTeradata SQL?Of course: SELECT MONTH_BGN_DATE FROM MONTHDAY_DIM WHERE MONTHDAY_KEY = ADD_MONTHS(DATE , -4) OR MONTHDAY_KEY = ADD_MONTHS(DATE , -3) If these are your actual queries, the 2nd closing pa...
201901 Jul 2013 @ 05:41 PDTDatabaseReplyCollecting statisticsHi Mahesh, no statistics will change the plan for this query, so you don't need any statistic at all. When performance is bad it might be due large spool usage. You might try MINUS ALL inste...
201801 Jul 2013 @ 05:37 PDTDatabaseReplyFind position of a character in a stringWhat's your TD release? In TD14 there's INSTR to find the nth occurence of a string or better STRTOK to extract the nth token from a delimited string. Previously you might check if INSTR ...
201701 Jul 2013 @ 05:32 PDTDatabaseReplyUpdate statement with left outer join in from clause.Hi Harpreet, is this an actually update statement? (SQL Server?) There's no condition to join to CDD_Today.   You might rewrite it: use a Correlated Subquery  UPDATE St...
201601 Jul 2013 @ 02:56 PDTToolsReplyODBC datetime format 'III' causing timestamp to time conversion to fail?It's the default formats for DATE/TIME/TIMESTAMP (in that order) and indicates INTEGER or ANSI. For DATEs both is ok (similar to SET SESSION DATEFORMAT), but for TIME and TIMESTAMP ANSI is pre...
201501 Jul 2013 @ 02:41 PDTDatabaseReplyqualify rank() over (partition) - questionDid you try the query i posted, this should work as expected. But performnace on a 5 billion rows table will be probably poor when you actually need all those 100 columns (all data will be put in ...
201401 Jul 2013 @ 02:37 PDTTeradata StudioReplyUnable To Create Stored Procedure Using JDBC !!Hi Rajeev, in BTEQ you have to put the source code of the SP in a file and then use .COMPILE But in Studio this should run as-is, 5526 indicates there were errors or warnings during compilation, ...
201301 Jul 2013 @ 02:02 PDTDatabaseReplyImplicit conversion of Integer to VARCHARHi Nishant, "group_amps" during an all-AMPs step usually means the optimizer assumes that less than 50% of the AMPs in the system will actually do some work, but the actual AMPs are not ...
201201 Jul 2013 @ 01:49 PDTDatabaseReplyHow to create records from a defined rangeSimply use two Derived Tables producing the required numbers and then cross join them.   Dieter
201127 Jun 2013 @ 11:41 PDTConnectivityReplyHow to Get the Session info (example: session number/id) when using Teradata .NET Provider.Hi Shiv, i don't know about the .Net Provider, but you can always submit a simple  "SELECT SESSION;"   Dieter
201027 Jun 2013 @ 11:39 PDTDatabaseReplyqualify rank() over (partition) - questionIt's hard to guess without any details about the rules you want to implement. select * from tab qualify rank() over (partition by inr, rd order by dt desc, ct1 desc, ct2 desc) = 1   ...
200926 Jun 2013 @ 09:53 PDTDatabaseReplyUpdating a table through viewHi Mahesh, i don't know what caused this, are you 100% shure the create view/grant/select all refernce the correct objects in the correct database? When the base table of a view is dropped th...
200826 Jun 2013 @ 09:38 PDTDatabaseReplyTimestamp format on teradata retrievalYour syntax is wrong, within a Create Table it's trns_dt timestamp(0) format 'MM/DD/YYYYBHH:MI'   Dieter
200725 Jun 2013 @ 11:57 PDTGeneralReplycalculate recency & absolute deviation for a datasetNest the aggregate in an OLAP function: SELECT customerid, MAX(purchasedate) - MIN(purchasedate), MAX(MAX(purchasedate)) OVER () - MAX(purchasedate) FROM tab GROUP BY 1 Dieter ...
200625 Jun 2013 @ 11:52 PDTDatabaseReplyIs there any way to handle single digit's in date?Simply add a comma ;-) SEL TO_TIMESTAMP('11/04/2011 11:26:35.345', 'MM/DD/YYYY hh:mi:ss.FF3')   Dieter
200525 Jun 2013 @ 02:47 PDTDatabaseReplyImprove performance of like queries. WHERE POSITION(V_FIRST_NM IN FIRST_NM) > 0 or WHERE SUBSTRING(FIRST_NM FROM 1 FOR CHAR_LENGTH(V_FIRST_NM) = V_FIRST_NM Dieter
200425 Jun 2013 @ 02:45 PDTDatabaseReplyDBQL MetricsI/O is the number of logical disk I/Os not the number of records. The esitmated vs. actual number of records is found in QryLogSteps. In your case the high count might indicate a Full Table Scan r...

Pages