#DateForumTypeThreadPost
390305 Aug 2015 @ 03:38 PDTDatabaseReplyTrying to Replace Blank value (may be null, may be space char) with 'N/A' Hi Arindam, did you work with Oracle before (where NULL sometimes equals '')? CASE WHEN ABC_INDICATOR = '' OR ABC_INDICATOR IS NULL THEN 'N/A' ELSE CAST(AB...
390204 Aug 2015 @ 02:54 PDTDatabaseReplyRegular expression with irregular resultI got you wrong, of course STRTOK doesn't work in your case. When I tried your expression outside of TD it returned the expected data, but Oracle always returned NULL, as it doesn't allow ...
390104 Aug 2015 @ 07:00 PDTDatabaseReplyHow to ensure atomic nature of multiple table actions?Each request places the neccessary locks (if they're not set already) and all locks will be released when the transaction is commited. But in every DBMS there's the same recommendation, se...
390003 Aug 2015 @ 08:27 PDTDatabaseReplyRegular expression with irregular resultIMHO this result is correct (if you remove a space '(?<=\*).*?(?=\*|$)'). But why thinking about a RegEx if you get the same requested result in an easier way? If consecutive deli...
389930 Jul 2015 @ 06:40 PDTDatabaseReplyHOw to join on nearest lower value in teradata sqlHi Deepak, the join is like this: select t2.*, t1.* from table2 as t2 join table1 as t1 on t1.i = (select max(t3.i) from table1 as t3 where t3.i <=t2.i) But this result in a product ...
389830 Jul 2015 @ 05:37 PDTDatabaseReplyHOw to join on nearest lower value in teradata sqlWriting the join-condition isn't that hard, but performance will be horrible :-) What's your Teradata release and the number of rows in those tables? Are those columns unique?
389730 Jul 2015 @ 01:47 PDTGeneralReplyData integrity in Teradata stored proceduresBy actually checking data integrity within your procedure and using transactions?  
389629 Jul 2015 @ 11:37 PDTDatabaseReplyHow to get the statement that was used to create a table in Teradata?Hi Khurram, this might return "create index" or "alter table" if the table definition was modified after creation.
389529 Jul 2015 @ 02:35 PDTDatabaseReplyUNICODE to CHAR Translate - TRANSLATE doesnt work.Hi Dave, of course you're correct. My session was set to ASCII instead of UTF.
389429 Jul 2015 @ 12:25 PDTDatabaseReplyHow to get the statement that was used to create a table in Teradata?SHOW TABLE mytable;
389329 Jul 2015 @ 10:45 PDTDatabaseReplyTeradata Syntax Error Your syntax is not valid, you need to move the ON before the join-condition: select all_members.member_amisys_nbr, eff_date.date_date as effective_date, end_date.date_date as end_da...
389229 Jul 2015 @ 08:05 PDTGeneralReplyHow to update a datatype of a column in a table having huge dataHi Pierre,  of course it's wasting spool, too. But it could be even worse, DEC(38,0) :-)
389129 Jul 2015 @ 06:41 PDTDatabaseReplyHow to bring un-utilized space for utilization in terdataSpool is only on the server side.
389029 Jul 2015 @ 06:38 PDTDatabaseReplyQuery to find tables with no stats defined/old statisticsYou need to query dbc.AccessLogV (preferred) or join dbc.QryLogObjectsV and dbc.QryLogV to find out which user used any kind of object. (Hopefully either Access or Query Lo...
388929 Jul 2015 @ 06:33 PDTGeneralReplyHow to update a datatype of a column in a table having huge dataHi Pierre, as INT and BIGINT hash the same the join should be exactly the same. same column with two datatypes is not suitable in a physical model Even more in a logical model :-)
388829 Jul 2015 @ 05:13 PDTDatabaseReplyGreenpum to Teradata Migration ( UDF hash_MD5() issue )Yes, hash_MD5(udf_utf16to8(col)) works with Unicode and returns the same result as a Unicode-MD5 (at least it's like that for SHA-256).  
388729 Jul 2015 @ 04:01 PDTDatabaseReplyUNICODE to CHAR Translate - TRANSLATE doesnt work.A ™ should be displayed correctly regardless of Latin or Unicode. If it's anything else you did something wrong. SELECT CHAR2HEXINT(col1) should result in '99' (Lartin) and '...
388629 Jul 2015 @ 03:56 PDTDatabaseReplyDoes one need unicode compression in Tredata 14.0When you need characters not covered by LATIN you must switch to UNICODE and then you don't care if comparisons are a bit less efficient. Regarding different hashes: Of course a 'bla'...
388529 Jul 2015 @ 03:33 PDTConnectivityReplylinux teradata ODBC SQLConnect ErrorWhat's your ODBC driver release? The first thing I would do is upgrading to a newer ODBC-version: ODBC Linux Even the latest release 15.10.00.00 is still compatible with TD14.
388429 Jul 2015 @ 03:09 PDTDatabaseReplyREGEXP_REPLACE does not replace all occurrences, even when setting occurence_arg=0Hi Gordh, it's working as expected on a 15.00.03.03, you should open an incident. As a workaround you can use an old trick: oTranslate(VAT, oTranslate(VAT, '0123456789','')...
388329 Jul 2015 @ 03:03 PDTGeneralReplyHow to update a datatype of a column in a table having huge dataYou can't decrease the precision of a column using ALTER TABLE. But why do you want to do that? Both DEC(12,2) and DEC(10,2) need the same space and you could simply add a CHECK(ramount BETWE...
388228 Jul 2015 @ 10:45 PDTGeneralReplyHow to update a datatype of a column in a table having huge dataHow big is the table, how many rows, any additional indexes? What's the old and the new datatype?
388128 Jul 2015 @ 10:44 PDTTeradata ApplicationsReplyExplain PlanIf the estimated row counts are wrong a step might perform quite bad, but all steps are executed exactly as-is.  
388028 Jul 2015 @ 10:10 PDTDatabaseReplyTeradata Open Query syntaxTeradata simply doesn't support linked servers (In TD15 there's something similar, named QueryGrid, but this doesn' support SQL Server, yet)
387928 Jul 2015 @ 09:42 PDTDatabaseReplyGreenpum to Teradata Migration ( UDF hash_MD5() issue )This UDF is defined for the LATIN charset and there's no Unicode version. For a similar SHA-UDF i'm using a simple solution, the udf_utf16to8 UDF from the Unicode Tool Kit: ...

Pages