#DateForumTypeThreadPost
407810 Dec 2015 @ 10:14 PSTConnectivityReplyBug in ODBC driver 15.10You probably mean JDBC 15.10 instead of ODBC :) I just tried it against a TD 15.10.00.08 using the latest Studio release 15.10.01.201511052035 & the built-in JDBC and it worked as ex...
407709 Dec 2015 @ 01:18 PSTDatabaseReplyXML Data Type not definedXML must be installed, in TD14.10 this should be a DIP-script: 19. DIPXML     - XML Data Type Ask your DBA to run it.
407608 Dec 2015 @ 01:52 PSTDatabaseReplyvery fast query + very fast query = very slow query ???Can you add some more details, (P)PI & statistics of both tables plus some Explains?
407505 Dec 2015 @ 03:48 PSTDatabaseReplyReverse a Revoke Delete on owned tableSeems you're the Creator (submited the CREATE), but not an Owner (based on the hierarchy of databases). In that case you lost the Delete right and can't grant it again. Either ask your DBA...
407405 Dec 2015 @ 03:45 PSTGeneralReplyaggregate functions to get the following outputWhy are zeroes returned for the last three rows and why is the result in the first row 200? How do you determine the order of rows for thos calculation?
407330 Nov 2015 @ 09:49 PSTDatabaseReplyHow to populate max value rows with in the group by eliminating the min valuesHi Sai, SQL Server support Cumulative Sums since SS2012, only QUALIFY is Teradata proprietary syntax, which can easily be replaced: select * from ( select id, startdate, en...
407214 Nov 2015 @ 05:04 PSTDatabaseReplyHow to write a Teradata regexp_replace() that replaces all numeric values but _N where N is a numeric value??<= -> this is a lookbehind, i.e. check if this expression [^_] (any character but no underscore) is before the next group, but don't add it to the match.    [0-9]+ ->...
407114 Nov 2015 @ 04:57 PSTDatabaseReplyOREPLACE Hi Shavyani, Steve's query will work, this also: TRIM(BOTH '''' FROM oREPLACE(string,''',''','/'))  
407014 Nov 2015 @ 04:49 PSTDatabaseReplyHow to get started using TeradataHi Octavio, for testing you simply need a single user, so logon with dbc and submit: CREATE USER myuser AS PERM = 20e+09, PASSWORD = mypassword; GRANT CREATE PROCEDURE ON myuser TO myuser; GR...
406914 Nov 2015 @ 04:42 PSTToolsReplyError 9128 : Transaction exceeds max. number of Row Hash locksSimply apply a LOCK TABLE mytab FOR WRITE; after the BT and before the USING to switch to a table lock instead.
406814 Nov 2015 @ 04:40 PSTDatabaseReplyHow to extract substring from a column based on spl char like '/' strtok(col, '_', 3)  
406704 Nov 2015 @ 03:27 PSTDatabaseReplyQuery runs for 5 hoursWithout DBQL Stepinfo it's hard to tell. As Todd said the MAX-subquery looks suspicious, a rewrite might be possible, but depends on the actual data... 
406604 Nov 2015 @ 03:19 PSTDatabaseReplyCan REGEXP_REPLACE be used to replace multiple strings with multiple replace stringsYou don't need REGEXP_REPLACE in this case, to replace single characters there's oTRANSLATE('ABC', 'AB', 'ZY') It's case specific, so for insensitive replaceme...
406531 Oct 2015 @ 06:10 PDTDatabaseReplyLINUX - BTEQ - Export data to file - Removing extra spaces between the column valuesBTEQ does not export in a delimited format.  You must either do lots of CAST & concats as krisaneesh proposed or utilize the CSV function in TD14.10:  WITH cte AS ( SELECT *...
406431 Oct 2015 @ 05:56 PDTDatabaseReplywhen to implement these methods in SQL Server?You'll increase the probability to get an answer when you post MS SQL Server related questions on a MS SQL Server forum :)
406328 Oct 2015 @ 03:51 PDTDatabaseReplyStored proc in Teradata gives an error "Invalid State"Posting the same question a 2nd time will not help, try to get help on an Oracle forum, this is Teradata territory...
406226 Oct 2015 @ 03:21 PDTDatabaseReplytrim and substring untill special charactersYou need a Regular Expression: REGEXP_SUBSTR(col, '.*(\(TM\)|\(R\)|®|™)', 1, 1, 'i')  
406126 Oct 2015 @ 03:07 PDTDatabaseReplyWork Around for Top N SubQuery in Stored ProcedureIf it's not allowed in a Subquery you can nest it in a Derived Table :-) SET Var1 = (SELECT MIN(Col1) FROM (SELECT Top 1 Col1 FROM Table order by Col1,Col2) AS dt);   Of course for ...
406026 Oct 2015 @ 02:59 PDTDatabaseReplyHow to extract substring from a column based on spl char like '/' strtok(col, '/', 1), strtok(col, '/', 2)  
405926 Oct 2015 @ 03:48 PDTDatabaseReplyHow teradata process select columnsCorrect, all row-based DBMSes need to read the full row from disk. In spool it's just the needed columns...
405826 Oct 2015 @ 03:43 PDTDatabaseReplyPartition Name wise Row Count of a partition tableThere's no partition nyme, just a number: select partition, count(*) from tab group by 1 order by 1  
405725 Oct 2015 @ 03:33 PDTDatabaseReplyHow to write a Teradata regexp_replace() that replaces all numeric values but _N where N is a numeric value?This finds all digits not preceeded by an underscore: regexp_replace(col, '((?<=[^_])[0-9]+)','0')  
405624 Oct 2015 @ 01:28 PDTGeneralReplyIs this explain plan normal?Hi Zarrar, EXPLAIN's "Estimated Rows"  for UNIONs are a cumulative sum, but the "Actual Rows" show the number of rows returned by this step. So 1055566 in st...
405524 Oct 2015 @ 11:20 PDTDatabaseReplySelect Failed [2616] Numeric Overflow occurred during computationThe first SELECT determines the datatypes, it's the 0.00 as BANK_AMT which results in a DECIMAL(3,2), needs to be CAST(0 AS DECIMAL(18,2)) as BANK_AMT
405424 Oct 2015 @ 11:16 PDTAnalyticsReplyRANK() Tiebreaker?Add a MAX(LOC_VST_DT) to the RANK: SEL T1.PERIOD_START, T1.PERIOD_END, T1.EMPID, T1.LOCID, RANK() OVER (PARTITION BY T1.PERIOD_START, T1.EMPID ORDER BY T1.PERIOD_START, T1.CNT, MaxDT D...

Pages