#DateForumTypeThreadPost
2318 Jun 2009 @ 06:45 PDTDatabaseReplyVONUSI VS PPIAssuming you have a value ordered NUSI on column, the optimizer will determine approximately how many rows lie between a and b. If the number is small enough (c 10%), it will pass the NUSI to get t...
2218 Jun 2009 @ 01:07 PDTToolsReplydelete and delete allFred is right! "Delete All" requires you to type 3 extra characters - that is the only difference.Under certain circumstances, Delete will use a Fastpath which avoids taking before images to the tr...
2118 Jun 2009 @ 12:50 PDTUDAReplyuse teradata table field values in shell script?This exports the shell variable DBVAR to the value in colname in load_work.setmonth. it goes into file newvar.shbteq<< EOD.RUN FILE /home/nbk6cst/dbpass;.os rm newvar.sh.export report file = ...
2017 Jun 2009 @ 06:53 PDTDatabaseReplyHow to find the row difference in TeradataThe following will work:Select D1.InsNo, D1.StartDate,D2.EndDateFrom -- Get All The Start Dates(Select InsNo, StartDateFrom InsurancesWhere (InsNo, StartDate) NOT IN (Select InsNo, EndDate From...
1917 Jun 2009 @ 12:56 PDTDatabaseReplyHow to speed up inserting data into volatile table ?You do not seem to have a primary index on your volatile table spec. The Create table will use the first column - does this have a wide range of values?Volatile tables use the same rules as permane...
1816 Jun 2009 @ 12:42 PDTToolsReplyCreate,drop macros using JDBCThe basic answer is no - you cannot speed it up.Setting up the macros is expensive because of the dictionary updating - you can get some very slow responses when you set up lots of database objects...
1714 Jun 2009 @ 12:48 PDTToolsReplyData loading via fastloadIn the Define statement, set the field to as it is on the input record. eg:Define BigNum (Char(32) ...... (Assuming it is character input) orDefine BigNum (Decimal 30,20) it is comes in raw form)DB...
1614 Jun 2009 @ 12:36 PDTToolsReplyET & UVIt is down to where the error is spotted.1. ET table contains data errors where Teradata cannot translate the field - invalid date, alpha in a numeric field.2. UV entries are generated when there i...
1505 Jun 2009 @ 11:46 PDTToolsReplyBteq IF ELSE STATEMENTYour requirement is not too clear, and you do not give your environment, but the following should help:You do not say what type of variable a is; I assume below it is a shell variable and is set in...
1412 May 2009 @ 01:00 PDTDatabaseReplyConvert hex string to numericNot really! It is really down to poor definition if you are holding numbers in hex strings.You do not say how long the strings are. The example below show how to convert a 4 character string to a n...
1311 May 2009 @ 11:01 PDTDatabaseReplyWhat's the quickest way to find out all the values under an attributesSlight change to Joe's answer:SELECT '; SELECT ' || TRIM(COLUMNNAME) || ' FROM ' || TRIM(DATABASENAME) || '.' || TRIM(TABLENAME) || ' (TITLE '')GROUP BY 1 ORDER BY 1;'FROM(SELECT DATABASENAME, TABL...
1211 May 2009 @ 05:56 PDTDatabaseReplymod() in viewMod is an ODBC extension - it will work in Queryman if you have the "Allow ODBC Extensions" option set, but does not work in bteq or any other "direct" SQL.Use:Create View A asSelect Hours mod 15 a...
1107 May 2009 @ 11:09 PDTToolsReplywhat is the difference between Partitioned primary index and secondary indexPartitioned primary index is basically physically splitting the table into a series of subtables, one for every partitioning value. Data for the partitioning values is held together on the DBC.When...
1007 May 2009 @ 06:55 PDTToolsReplyHow to skip data errors during fastload?Use the NOSTOP option on the SET RECORD command.
904 May 2009 @ 08:35 PDTUDAReplyTransform data setThe following two scripts assume that your lines are all in the correct sequence - an Access Number followed by 5 Attribute values.It first changes the "Access Number" header to a newline, removes ...
822 Apr 2009 @ 02:25 PDTDatabaseReplyWhat is the best way to calculate the tablespace manually.The following will calculate the average rowsize on the existing table. It will take EVERYTHING into account - row header, secondary indices, compression, varchar and unused space in the blocks.Sel...
722 Apr 2009 @ 02:02 PDTAnalyticsReplyNeed to load a column from a header field.If the header record is always the first record on the file, do a BTEQ import of the first record only.Otherwise, move to Multiload.
622 Apr 2009 @ 01:52 PDTUDAReplyFORMAT m/d/yy column as DD/MM/YYYYThe following will reformat your date column to a standard dd/mm/yy.If you are loading via Multiload or TPump, you can use it in the load. With Fastload, you have to take it in as character and use...
527 Mar 2008 @ 11:23 PDTToolsReplyBatch queryman (windows) - how to pass dynamic parameterFor DOS/ Windows, use %variable%
427 Mar 2008 @ 11:06 PDTToolsReplyMload - error 6706Use Translate_Chk(field,UNICODE_TO_ASCII).This gives you the character number in the field which causes the 6706 error, or zero if it is OK.If there is only one bad character, you can use substring...
312 Mar 2008 @ 06:16 PDTAnalyticsReplyFast ExportIf you want to do it in batch, you can:Select Trim(Prdid)||','||Trim(Prdcd) (Char(40))From ....;That produces a 40 character line with the comma delimited Prdid and Prdcd and spaces at the ...
207 Mar 2008 @ 05:52 PSTUDAReplyQuery Performance Optimization HelpTry this. A Minus often works faster than a "Not In/ Not Exists"LOCK TABLE pre_load_image FOR access LOCK TABLE post_load_image FOR access SELECT 'sap_clnt_id=' || COALESCE( A.sap_clnt_id , '' )...
126 Sep 2007 @ 05:02 PDTDatabaseReplyneed help with this processYou are doing left join from z to a, but the NUPI set up by this query is on the Incident id from a.So you are potentially getting lots of nulls in the PI field.Check the answer set bySelect incide...

Pages