603 | 04 Aug 2009 @ 04:13 PDT | Tools | Reply | How to COLLECT STATS in BTET Mode in Multi-Statement BTEQ Scripts! | In BTEQ there's no need to use BT/ET for a multistatement, because it's already a transaction.COLLECT STATS is considered as a DDL statement, thus it's not allowed within a multistatement unless it... |
602 | 04 Aug 2009 @ 04:04 PDT | Tools | Reply | How to compile pp2c file using visual studio | Hi Shrihari,when you're running Teradata Express you should install the matching TTU 12 and check the matching manuals for TD12 (it's on the DVD).The name of the exe changed to ppcmain.exeDieter |
601 | 04 Aug 2009 @ 03:52 PDT | Database | Reply | Multi-row INSERTs | Hi Steve,you're correct, Teradata doesn't support that syntax.But you might submit a multistatement-request (MSR), BTEQ it's:Insert into CALL_DETAILS (id, start_time, comments)VALUES (123, 12:45, ... |
600 | 04 Aug 2009 @ 03:40 PDT | Database | Reply | Ignoring duplicated rows and keep inserting. | Hi Anderson,which tool do you use?Does it stop after the dup row and doesn't finish? Most tools allow a setting to ignore errors.Or you just don't want that error message? AFAIK there's no way to a... |
599 | 04 Aug 2009 @ 03:33 PDT | Analytics | Reply | Release Lock from a Table | RELEASE LOCK doesn't remove SQL locks but MLoad/ARC locks. There's no way to release a lock before the transaction is finished.Do you have access to PMon to check for locks?Are there concurrent qu... |
598 | 04 Aug 2009 @ 03:20 PDT | UDA | Reply | SQL - Combine Two rows in to One | Is the combination UserID/Status/ProductID unique?Then it's a Full Outer Join:SELECT COALESCE(t1.t_id,t2.t_id), COALESCE(t1.prod_id,t2.prod_id), t1.t_date AS start_date, t2.t_date AS end_dateF... |
597 | 04 Aug 2009 @ 02:56 PDT | Database | Reply | Grouping partially correlated data | Hi Kevin,
to me it seems a very strange report, are you shure its not confusing?
It's easy to get using OLAP functions:
SELECT
COALESCE(t1.inpatient_data_id,t2.inpatient_data_id),
t1.t... |
596 | 04 Aug 2009 @ 10:50 PDT | Tools | Reply | Fastload not handling VARCHAR field in Linux? | The table definitions differ:
ORG_STN_BA_CD
ORG_CITY_BA_CD
DEST_STN_BA_CD
DEST_CITY_BA_CD
are all defined as CHAR(1) but it's LATIN in the source table and UNICODE in the target.
Dieter |
595 | 31 Jul 2009 @ 02:13 PDT | Database | Reply | Partitioning by a character column | Partitioning by chars is not possible, yet. Thus you can't use any character functions like POSITION for partitioning.There's a trick to bypass that restriction, but i doubt it's really usefull:e.g... |
594 | 31 Jul 2009 @ 02:01 PDT | Database | Reply | Tab in column | There's a CHAR2HEXINT function which return a hex-string, e.g.select char2hexint('bla'); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 seconds.Char2HexInt('b... |
593 | 31 Jul 2009 @ 01:56 PDT | Database | Reply | KILL Teradata Database Session | If your on TD12 you might use the syslib.AbortSessions UDF.Before TD12 there's no way to kill a session using SQL, you have to use the PMon-API or some command line tool.Dieter |
592 | 31 Jul 2009 @ 01:54 PDT | Database | Reply | Import Problem - Date field | How do you try to import it?BTEQ/FastLoad/MLoad/TPump/SQL Assistant?Instead of changing the format in your input file you might simply add a FORMAT in the INSERT.Dieter |
591 | 31 Jul 2009 @ 01:51 PDT | Database | Reply | How to check if data is in upper case or not | Hi Venkatesh,why do you need to know about that?If you need it in uppercase just use the UPPER function or define the column as UPPERCASE.Dieter |
590 | 31 Jul 2009 @ 10:48 PDT | Database | Reply | Lock Info | The only way to see all locks is the Lock Display (lokdisp) command line utility.
If you want to know if a query is blocked you might use PMon or (in TD12) write some queries using the Open API ... |
589 | 31 Jul 2009 @ 10:44 PDT | Database | Reply | SQL | Is the first or the second ins/sel faster?
How do you measure it?
Unless one ins/sel is into an empty table and the other into a populated table there will be no difference.
Dieter |
588 | 31 Jul 2009 @ 10:41 PDT | Tools | Reply | Fastload not handling VARCHAR field in Linux? | Where do you spot that field length in the above file dump?
Could you post the actual table definition and the FastLoad output (especially the DEFINE)?
And, as Steven already asked for, a sample ... |
587 | 30 Jul 2009 @ 08:02 PDT | Tools | Reply | MLOAD with secondary index | Based on the indexname i guess MLoad complains about a USI.
And yes, it is possible, you can do the drop within the laod script, too.
Just have a look at the MLoad manual.
Dieter |
586 | 30 Jul 2009 @ 12:10 PDT | Database | Reply | Sample duration in DBQLSummaryTbl | It's for all DBQL tables, but the probability that the summary cache will overflow is much lower due to less data.
Dieter |
585 | 29 Jul 2009 @ 12:03 PDT | Database | Reply | CPU usage of PE and RSG? | You're looking for the VprType column in ResUsageSVpr:
Type of vproc. In non-Summary Mode, the
values can be “NODE,” “AMP,” “PE,” “GTW,”
“RSG,” or “VSS”. In Summary Mod... |
584 | 29 Jul 2009 @ 11:56 PDT | Database | Reply | Teradata 12 and Subqueries | In most cases a Scalar Subquery might be rewritten as a Left Outer Join.
But your query is even easier (untested):
SELECT component_location_id, component_type_code,
AXLE,
SIDE,
TRUCK
... |
583 | 29 Jul 2009 @ 11:38 PDT | General | Reply | Handling Gaps in Date Ranges. | Cursor in Teradata are really worst case, sequential processing in a parallel database, so it's a good ideas to avoid them :-)
Out of curiosity, why do you use a BTEQ script instead of an SP?
... |
582 | 29 Jul 2009 @ 04:50 PDT | Tools | Reply | DATA MOVER TOOL | If you search on the docu site www.info.teradata.com you'll find a manual:
http://www.info.teradata.com/eDownload.cfm?itemid=090580001&type=TD
Dieter |
581 | 29 Jul 2009 @ 04:26 PDT | Database | Reply | IOWAIT on Teradata systems | I just checked it, according to the recommendations CPUIoWait should be even less than 10% when the system is 100% busy. But this was some years ago before the new Linux system, i don't know if thi... |
580 | 29 Jul 2009 @ 03:32 PDT | General | Reply | Handling Gaps in Date Ranges. | Uh oh, this is a hard one.
If i hear "cursor", i usually think about OLAP-functions. But this is probably not possible using those (at least not without nesting several levels).
Then i thought, "... |
579 | 29 Jul 2009 @ 03:25 PDT | Database | Reply | IOWAIT on Teradata systems | Of course a high IOWAIT is bad, but It mainly depends on the duration. Some peaks might be ok, e.g. if you run large loads.
Do you know what kind of work is going on during that time?
Dieter |