#DateForumTypeThreadPost
7323 Sep 2009 @ 03:05 PDTToolsReplyStrip Linefeed/Tab charactersThe function is oreplace, not replace.It is only available if you have set up the Oracle UDF's, available from the Teradata website. (And you have access to them!)If you want to strip off linefeed ...
7219 Sep 2009 @ 05:23 PDTDatabaseReplyStored Procedures and the Data DictionaryDBC.TableText contains the full text for tables, views and macros. I have used it for these, check it out for procedures.
7118 Sep 2009 @ 10:16 PDTToolsReplyI am unable to load data using SQL Assistanceinsert into product (p_partkey, p_name, p_mfgr, p_type,p_size, p_container, p_retailprice, p_comment) values(?,?,?,?,?,?,?,?);Assuming there is no default on the p_brand. If the column is not menti...
7017 Sep 2009 @ 02:47 PDTConnectivityReplyConnecting Python to Teradata over ODBCThe example you gave is from a pyodbc website. If you "import pyodbc" before running this example, it works fine (at least on Windows) See below for example. Can you give me any details on the...
6916 Sep 2009 @ 03:15 PDTAnalyticsReplyTeradata SQL Assistant result setI tried it with Queryman 12 and it got rid of the carriage returns fine - whether or not the option was set!?!If you have the Oracle UDF's installed, use the following to get rid of carriage return...
6816 Sep 2009 @ 11:23 PDTDatabaseReplyTeradata IDENTITY columnsWhen records are stored with an identity column, the system gets a batch of numbers for each AMP (assuming they go in by Insert Into/ Select). There are a number of reasons why they may not be cons...
6716 Sep 2009 @ 11:10 PDTToolsReplyFastload error.LogTable is a Multiload command, not Fastload. The rest of the script looks like Fastload though.Try removing the Logtable command and try again.If you still have a problem, show the output, not t...
6616 Sep 2009 @ 09:00 PDTToolsReplyCAN I WRITE ERRORED RECORDS INTO A FILE IN MLOAD?DISPLAY ERRORS writes the error records to syserr.Your command redirected sysout, not syserr.Use:mload 2>/Informatica/TgtFiles/error_TEIS_CRMC_CU_PSTL_PERS_ORG_NM.outThat should write sysout to ...
6515 Sep 2009 @ 01:37 PDTAnalyticsReplyInserting '?' into a TD tableIf it is a real question mark:Insert into Tbl(CharField)Values ('?');If it is a real special character, you need to find the hex value of the character you want to set up. For Line feed (X'0A'):Ins...
6415 Sep 2009 @ 07:31 PDTToolsReplyFastload error-Kindly Help!!Take a look at chapter 2 in the Fastload reference manual.You can set up a config file floadcfg.dat with a minimum and maximum number of sessions. Set the max to 50% of the number of AMPS and the m...
6315 Sep 2009 @ 07:14 PDTDatabaseReplyDecimal not what it seems?Dont blame Teradata, blame you and Bill! (of Microsoft)If you do:select100000000000000000000000 (decimal(38,0)), 100000000000000000000001 (decimal(38,0));in Bteq, the answer comes back correctly.In...
6215 Sep 2009 @ 02:16 PDTToolsReplyFastload error-Kindly Help!!When the fastload tried to logon, there were too many sessions already logged onto the Teradata. So it logged on as many as it could and ran with this.If no sessions is specified, it will try to go...
6114 Sep 2009 @ 11:29 PDTUDAReplyROW_NUMBER() - numeric overflow errorYou are only casting the final result as decimal(18). Assuming Ms_Handler_Key_Id is an integer or smallint, it will do the arithmetic as integers.So try:SELECT (CAST(Ms_handler_key_id As Decimal(18...
6014 Sep 2009 @ 04:23 PDTDatabaseReplyOLAP function for rolling twelve month revenueI can see why OLAP is giving you problems.Try the enclosed - build a refernece table of required dates and do a product join to this.Create Volatile Table Periods(Period_Dt Date Not Null, Mo...
5906 Sep 2009 @ 10:51 PDTUDAReplyTeradata SchemaYes!The schema type you use is a function of the database design, not the database software you use.For a full data warehouse, 3NF is the best at being able to dig into the data. But you invariably...
5806 Sep 2009 @ 10:45 PDTDatabaseReplyRecursive Updation in QueryPersonally, I would set the group id to the first member of the group! The script below gives you the result you are looking for though - for the data you gave. HTHCreate Volatile Table TblA (Col1 ...
5704 Sep 2009 @ 03:17 PDTToolsReplyHow to Convert VARCHAR(30) to a DATE in FastloadInsert Into Tbl(DTFld )Values (:DTFld (Date, Format 'mm/dd/yyyy');Should work as long as the date is left aligned. If it is right aligned, you will have to specify the 20 spaces in the format com...
5604 Sep 2009 @ 05:19 PDTConnectivityReplyODBC characters tarnslation issueIs your username set up with a default character set of Unicode?
5503 Sep 2009 @ 03:44 PDTDatabaseReplyget the latest modified date of stored proedureDBC.Tables, TableKind = 'P', LastAlterTimeStamp is the date the procedure was last created/ replaced. (LastAlterName is the culprit who did it!)
5403 Sep 2009 @ 05:50 PDTDatabaseReplyCount&Sub CountCount does not count the number of mulls.Create volatile table vt1 (CompID smallint not null, compName Char, compValue smallint) primary index (CompID)on commit preserve rows ;insert into vt1 valu...
5331 Aug 2009 @ 04:19 PDTDatabaseReplyTRIM/DROP non-printable trailing CHARACTERSIf you only need to remove a newline from the end of the line, you can use the following:Select myPK, myVarCol,myDesc,Char2HexInt(myVarCol) , Char2HexInt(substr(myVarCol,1,Chars(myVarCol)-1))From T...
5230 Aug 2009 @ 07:23 PDTToolsReplyInput types to TPUMP ?TPump is not the ideal tool for moving a million records around - it is much slower than Fastload or Mload, and uses a lot more resource!Best way is to export the data to a flat file or pipe it dir...
5130 Aug 2009 @ 07:16 PDTToolsReplyMLOAD problem with loading special charactersWhat character set are you using for your load?( If you do not specify this in Mload, check the Mload output just after the Login statement; his will tell you what character set you are using.)I do...
5030 Aug 2009 @ 04:37 PDTDatabaseReplyAn important question on viewsSlight typo when I pasted the wrog version in! That should be: Replace Macro DuffView (DBName Char(30) Not Null, ViewName Char(30) Not Null) AS (Insert Into DBName.Views_To_Check Values ('...
4930 Aug 2009 @ 03:52 PDTDatabaseReplyAn important question on viewsThe following bteq script will set up a table with all the views which showed any error when they were accessed. Replace Macro DuffView (DBName Char(30) Not Null, ViewName Char(30) Not Null) A...

Pages