3903 | 05 Aug 2015 @ 03:38 PDT | Database | Reply | Trying 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... |
3902 | 04 Aug 2015 @ 02:54 PDT | Database | Reply | Regular expression with irregular result | I 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 ... |
3901 | 04 Aug 2015 @ 07:00 PDT | Database | Reply | How 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... |
3900 | 03 Aug 2015 @ 08:27 PDT | Database | Reply | Regular expression with irregular result | IMHO 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... |
3899 | 30 Jul 2015 @ 06:40 PDT | Database | Reply | HOw to join on nearest lower value in teradata sql | Hi 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 ... |
3898 | 30 Jul 2015 @ 05:37 PDT | Database | Reply | HOw to join on nearest lower value in teradata sql | Writing 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?
|
3897 | 30 Jul 2015 @ 01:47 PDT | General | Reply | Data integrity in Teradata stored procedures | By actually checking data integrity within your procedure and using transactions?
|
3896 | 29 Jul 2015 @ 11:37 PDT | Database | Reply | How 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.
|
3895 | 29 Jul 2015 @ 02:35 PDT | Database | Reply | UNICODE to CHAR Translate - TRANSLATE doesnt work. | Hi Dave,
of course you're correct. My session was set to ASCII instead of UTF.
|
3894 | 29 Jul 2015 @ 12:25 PDT | Database | Reply | How to get the statement that was used to create a table in Teradata? | SHOW TABLE mytable;
|
3893 | 29 Jul 2015 @ 10:45 PDT | Database | Reply | Teradata 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... |
3892 | 29 Jul 2015 @ 08:05 PDT | General | Reply | How to update a datatype of a column in a table having huge data | Hi Pierre,
of course it's wasting spool, too.
But it could be even worse, DEC(38,0) :-)
|
3891 | 29 Jul 2015 @ 06:41 PDT | Database | Reply | How to bring un-utilized space for utilization in terdata | Spool is only on the server side.
|
3890 | 29 Jul 2015 @ 06:38 PDT | Database | Reply | Query to find tables with no stats defined/old statistics | You 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... |
3889 | 29 Jul 2015 @ 06:33 PDT | General | Reply | How to update a datatype of a column in a table having huge data | Hi 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 :-)
|
3888 | 29 Jul 2015 @ 05:13 PDT | Database | Reply | Greenpum 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).
|
3887 | 29 Jul 2015 @ 04:01 PDT | Database | Reply | UNICODE 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 '... |
3886 | 29 Jul 2015 @ 03:56 PDT | Database | Reply | Does one need unicode compression in Tredata 14.0 | When 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'... |
3885 | 29 Jul 2015 @ 03:33 PDT | Connectivity | Reply | linux teradata ODBC SQLConnect Error | What'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.
|
3884 | 29 Jul 2015 @ 03:09 PDT | Database | Reply | REGEXP_REPLACE does not replace all occurrences, even when setting occurence_arg=0 | Hi 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','')... |
3883 | 29 Jul 2015 @ 03:03 PDT | General | Reply | How to update a datatype of a column in a table having huge data | You 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... |
3882 | 28 Jul 2015 @ 10:45 PDT | General | Reply | How to update a datatype of a column in a table having huge data | How big is the table, how many rows, any additional indexes?
What's the old and the new datatype?
|
3881 | 28 Jul 2015 @ 10:44 PDT | Teradata Applications | Reply | Explain Plan | If the estimated row counts are wrong a step might perform quite bad, but all steps are executed exactly as-is.
|
3880 | 28 Jul 2015 @ 10:10 PDT | Database | Reply | Teradata Open Query syntax | Teradata simply doesn't support linked servers (In TD15 there's something similar, named QueryGrid, but this doesn' support SQL Server, yet)
|
3879 | 28 Jul 2015 @ 09:42 PDT | Database | Reply | Greenpum 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:
... |