505 | 18 May 2009 @ 06:21 PDT | UDA | Reply | Concatenating different values in a field... | You will have to cook up a recursive query, something like this ....WITH RECURSIVE RECTABLE(ID_, NAME_, PREV_NAME_)AS(SELECT ID, MIN(NAME) (VARCHAR(1000)) , MIN(NAME)FROM MYDATAGROUP BY 1UNION ALLS... |
504 | 18 May 2009 @ 05:25 PDT | Database | Reply | How to find disk space used by a table. | SELECT SUM(CURRENTPERM) ACTUALSPACE, MAX(CURRENTPERM)*(HASHAMP()+1) EFFECTIVESPACEFROM DBC.TABLESIZEWHERE DATABASENAME = 'mydb' AND TABLENAME = 'mytable'; |
503 | 15 May 2009 @ 06:42 PDT | Tools | Reply | How to find a primary key in teradata tables? | As a practice, database is not the right place to sort out what is the primary key of the table, that should be maintained in the data model.If you explicitly define a primary key in the table def... |
502 | 13 May 2009 @ 04:42 PDT | Tools | Reply | Improving Loading Mechanism using Fastload | That's the named pipe access module.Teradata utilities are capable of reading/writing into a fifo (aka named pipe). This reduces the necessity for filesystem storage etc, especially when transferri... |
501 | 13 May 2009 @ 04:04 PDT | UDA | Reply | Storing TD Stored Procedures | put the stored procedure definition into a file ( mysp.sql )REPLACE PROCEDURE TESTIT()begindeclare o_msg varchar(10) ;end;then in bteq do a.compile file = mysp.sql;The other option is put the def... |
500 | 12 May 2009 @ 05:57 PDT | Tools | Reply | Tpump- Pack factor and sessions ? | That's true in that case there's a possibility of dead lock, one way to avoid that is to put pack factor 1 (very lousy in terms of performance). |
499 | 12 May 2009 @ 05:45 PDT | Database | Reply | Case | Case is always evaluated and processed from the first, and the first true condition is what you always get as output. Besides once case statement can output only one attribute.So in your case, you ... |
498 | 12 May 2009 @ 05:13 PDT | Training | Reply | new to Teradata | In SQL Assistant, press F2 |
497 | 11 May 2009 @ 07:23 PDT | Database | Reply | What's the quickest way to find out all the values under an attributes | You should probably ask your boss to get you some kind of data mining tool ... :oNow if you are really stuck, the below SQL to "generate" all the required SQLs for you.SELECT 'SELECT ' || TRIM(COL... |
496 | 11 May 2009 @ 07:03 PDT | Database | Reply | Valid query or not??? | You are probably trying an oracle syntax that doesn't work on Teradata.you will have to try something like this ...UPDATE AFROM TblA A, (subquery returning a single value) BSET cola = B.colBWHERE A... |
495 | 11 May 2009 @ 06:40 PDT | Tools | Reply | Tpump- Pack factor and sessions ? | If we both are talking the same stuff (oh..) then there are no "multiple" tpump jobs. There's only one tpump job, with multiple sessions. And the job takes care of routing records to proper session... |
494 | 10 May 2009 @ 08:51 PDT | Tools | Reply | Tpump- Pack factor and sessions ? | Actually it "depends"For example, if you had serialize on, and all the three records had the same value for key, you would end up using just one session. On the other hand if all the three records ... |
493 | 08 May 2009 @ 08:10 PDT | Tools | Reply | Tpump- Pack factor and sessions ? | In simpler terms pack factor helps you to bundle up a bunch on instructions into a single package and send it to TD. That's faster than sending one instruction, getting back it's ACK/RESP from TD, ... |
492 | 08 May 2009 @ 08:06 PDT | Tools | Reply | Tpump - Serialize ? | The purpose of serialize option is to reduce the locking/blocking overhead between different sessions, with serialize feature you have the ability to specify that all rows with a given PI value get... |
491 | 08 May 2009 @ 07:43 PDT | Database | Reply | Automating packdisk and checktable? | As an example, to run packdisk, first you need to decide what is the criteria on which u need to pick the tables to pack .The below command will list tables occupying more than 100 cylinders with a... |
490 | 08 May 2009 @ 07:07 PDT | Database | Reply | For loop problem | This is what I could make to work ...(in Teradata mode)CREATE VOLATILE TABLE MYUSERID.Test1(location_id INTEGER) ON COMMIT PRESERVE ROWS;INSERT INTO MYUSERID.Test1 VALUES(1000);INSERT INTO MYUSERID... |
489 | 20 Jan 2009 @ 11:51 PST | Database | Reply | ANSI versus Teradata Mode Transactions | Yes they are treated like DDL statements. |
488 | 19 Jan 2009 @ 01:44 PST | Tools | Reply | How to get return code after BTEQ excuted SQL in VBScript | I am not a VB guy, but I suspect that you would also want to add a quit statement at the end of all this.WshShell.SendKeys ".quit {ENTER}"bteq won't terminate in interactive mode without something ... |
487 | 19 Jan 2009 @ 01:38 PST | UDA | Reply | what is the sqlloader equivalent in Teradata | Teradata SQL assistant also allows you to load data from files to tables. but is a bad idea for a large amount of data. generally good for small samples / reference tables kind of scenarios.And the... |
486 | 15 Jan 2009 @ 09:38 PST | Tools | Reply | BTEQ loop | I don't think that's possible, because even if you try to use some kind of logic and put a GOTO command to a previous label, it won't work as GOTO commands read labels only forward, it doesn't go b... |
485 | 13 Jan 2009 @ 12:10 PST | UDA | Reply | How to CREATE , INSERT TABLES INTO PERSONAL DATABASE FROM THE COMPANY'S DATA WAREHOUSE | You can go through the data definition and sql manuals from teradata to learn detailed syntax,but here are some samples/* Table JOHN.Jump already exists and the column data types match those of the... |
484 | 11 Jan 2009 @ 06:47 PST | Training | Reply | Recommended SQL Editor? | If you are looking for Freely available SQL clients, there's the Squirrel SQL client which works over JDBC and the Teradata Eclipse plugin which can be used to connect to To teradata via Eclipse (&... |
483 | 09 Jan 2009 @ 10:19 PST | UDA | Reply | Looking for dynamic SQL for cloning stats from a table. | depends ...if you want to duplicate an entire table with its stats,create table a as b with data and stats;but if you already have the table structure in place and copy over the stats definitions a... |
482 | 08 Jan 2009 @ 09:29 PST | Database | Reply | Teradata equivalent of Oracle RAISE_APPLICATION_ERROR or MS SQL RAISERROR? | I think you are missing a few arguments ?void setExc_xsp(VARCHAR_LATIN *inputString,char sqlstate[6]SQL_TEXT fncname[129],SQL_TEXT sfncname[129],,SQL_TEXT error_message[257]) |
481 | 06 Jan 2009 @ 09:34 PST | UDA | Reply | Return a version id as at a particular date | I didn't test, but you can try something like this.inner joinon version.reference = instruction.referenceand instruction.instructiondate >= version.effectivedatequalify rank() over(partition by ... |