3578 | 09 Mar 2015 @ 04:21 PDT | General | Reply | Is Null conditions in ON (Join) Vs. Is Null in Where | This is not specific for IS NULL, whenever you add a condition to the ON it's evaluated during the join, while a condition on WHERE is evaluated after the join.
See: http://www.in... |
3577 | 09 Mar 2015 @ 04:14 PDT | General | Reply | Date format DD-MON-YYYY to YYYY-MM-DD | What's the actual data & datatype of col?
|
3576 | 09 Mar 2015 @ 04:13 PDT | Database | Reply | Generating sequence numbers for given range values | Hi Prado,
you might create a table UDF returning a sequence of numbers.
|
3575 | 09 Mar 2015 @ 04:10 PDT | Database | Reply | Defining two derived tables using WITH clause ?? | Hi Ashish,
afaik you can't use WITH in an Update.
|
3574 | 07 Mar 2015 @ 08:15 PST | Database | Reply | High CPU utilization query : While doing all-AMPS merge | Of course you don't need any statistics for a simple INSERT/SELECT, but if you want more accurate estimates you must change the WHERE-condition, e.g.
WHERE PERD_ID between 201300 and 201499... |
3573 | 07 Mar 2015 @ 08:09 PST | Database | Reply | Defining two derived tables using WITH clause ?? | Hi Ashish,
your syntax is wrong, it's INSERT INTO ... WITH SELECT ... instead of WITH SELECT ... INSERT INTO ...
|
3572 | 07 Mar 2015 @ 08:04 PST | Database | Reply | Generating sequence numbers for given range values | Hi Prado,
seems like you want to expand blocks of ip-addresses.
If your query runs out of spool it's probably not because of the recursion but due to the number of rows returned.
Also recurs... |
3571 | 05 Mar 2015 @ 12:54 PST | General | Reply | Date format DD-MON-YYYY to YYYY-MM-DD | Of course VarChar is the wrong datatype for storing a date, better cast it once during load and store it as a date.
You could cast the varchar to a date and then back to a varchar:
TO_C... |
3570 | 05 Mar 2015 @ 12:40 PST | Database | Reply | How to get a substring until the nth occurance of a character | Regular expressions are supported since TD14:
REGEXP_SUBSTR(col, '(.*?\^){2}(.*?)(?=\^)')
|
3569 | 04 Mar 2015 @ 10:43 PST | Database | Reply | BITAND Function not working | It's the BITAND in SYSLIB (previously installed as user UDFs at your site), which comes before TD_SYSFNLIB in the search path.
|
3568 | 04 Mar 2015 @ 01:50 PST | Database | Reply | BITAND Function not working | Works for me, what's your TD release?
Which overloaded functions exist on your system?
SELECT DatabaseName, FunctionName, ParameterDataTypes
FROM dbc.FunctionsV
WHERE FunctionName = '... |
3567 | 04 Mar 2015 @ 09:58 PST | Tools | Reply | TPT Loading | What's your TPT release?
14.10 supports formatted dates using VARDATE, e.g.
DEFINE SCHEMA ...(
col VARDATE(10) FORMATIN('DDMMMYYYY') FORMATOUT('YYYY-MM-DD')
|
3566 | 04 Mar 2015 @ 09:40 PST | General | Reply | Stored Proc In Teradata For Calculated Field | How do you currently implement the calendar for different countries/regions?
The sequential number of business days can be easily calculated multiple times, one per country.
|
3565 | 04 Mar 2015 @ 02:18 PST | General | Reply | Stored Proc In Teradata For Calculated Field | There was a similar question on StackOverflow:
How to add column A (date column) to Column B ( number of business days) in teradata to get the new date?
The easiest way to do this is calc... |
3564 | 04 Mar 2015 @ 01:06 PST | Database | Reply | Teradata String Manipulation, Extract String from a text field. | If you're on TD14 the easiest way will be STRTOK:
strtok(P_ID,'~',3)
|
3563 | 03 Mar 2015 @ 10:09 PST | Extensibility | Reply | Hide the source code of a SQL UDF from users | Hi Rolf,
afaik there's no way to hide the source of a SQL UDF (only SPs supports the NO SPL option).
And if it was possible, one could simply use it in a WHERE-condition and then Explain reve... |
3562 | 02 Mar 2015 @ 01:48 PST | Cloud Computing | Reply | VM Express GDO file isf.gdo is corrupted(?) | You shouldn't have to send beer to Munich :-)
|
3561 | 02 Mar 2015 @ 01:21 PST | Database | Reply | Failure 9128 The transaction exceeded the maximum number of rowhash locks allowed | Every single row Insert needs a RowHash-lock.
If there's one million rows inserted within a single transaction this will result in one million RowHash-locks.
So either don't do it within ... |
3560 | 01 Mar 2015 @ 11:37 PST | Cloud Computing | Reply | Error while opening downloaded TD14 express | Hi Samir,
did you unzip using the 7zip utility or Windows built-in? Windows unzip chokes on large files...
This is from http://developer.teradata.com/database/articles/introduction-to-terada... |
3559 | 01 Mar 2015 @ 11:11 PST | Cloud Computing | Reply | VM Express GDO file isf.gdo is corrupted(?) | Check /etc/opt/teradata/tdconfig/Backup for a copy of the gdo.
Otherwise you might simply delete the gdo, it will be automatically recreated with default values when the PDE starts. Of course... |
3558 | 27 Feb 2015 @ 04:15 PST | Database | Reply | Querying data for time period | You want the device with the latest activation date for the specified bill period?
select *
FROM
VT_TEST_DATA_1 A
INNER JOIN
VT_TEST_DATA_2 B
ON A.USER_ID = B.USER_ID
an... |
3557 | 27 Feb 2015 @ 04:04 PST | Database | Reply | update syntax | Hi Kevin,
you might have been exposed to MySQL :)
MySQL does it the way you described, but every other DBMS does it like Teradata, the order within the SET is irrelevant.
Instead of two ... |
3556 | 26 Feb 2015 @ 11:28 PST | Database | Reply | QUERY IS RUNNING LONG TIME(40 MINS) TO EXTRACT 1 LACK RECORDS | This problem is usually caused by duplicate row checks due to a bad Primary Index on a SET table.
What's the actual data in CDD.DT_ID?
|
3555 | 25 Feb 2015 @ 11:37 PST | Database | Reply | Multiple values in where clause | This seems to be the same requirement as this question: Need help to create SQL query
SELECT
A.PRODUCT_NM
, A.PRODUCT_ID
, CASE WHEN COUNT(*) = COUNT(B.PRODUCT_... |
3554 | 25 Feb 2015 @ 11:05 PST | Database | Reply | SQL that shows current queries | The query I posted is pure SQL, you can submit it from any client.
|