#DateForumTypeThreadPost
9607 Dec 2006 @ 05:15 PSTDatabaseReplyParitition Elimination using SubstitutionUnlike "static" partition elimination, Dynamic Partition Elimination happens during a join.It may not work with the CAST in the expression anyway, but try this:explainusing (d1 date)select *from st...
9506 Dec 2006 @ 09:20 PSTDatabaseReplyStored Procedure ProblemThink about the value of the string expression. This is NOT what you want:'SYS_CALENDAR.CALENDAR WHERE CALENDAR_DATE < '||VAR_DATEbecause that would become (for example)'SYS_CALENDAR.CALENDAR WHERE...
9406 Dec 2006 @ 07:23 PSTDatabaseReplyjoint account issueThe problem is the DISTINCT in the query creating your table. Do a simple SELECT COUNT(*) from both tables and you will see the number of rows differs. In other words, there is at least one party w...
9304 Dec 2006 @ 04:14 PSTUDAReplyTurn on AccesslogMacro DBC.AccLogRule is created via DIP selection DIPACC. Then you have to restart the database to actually enable access logging. And use BEGIN LOGGING to specify what gets logged.
9230 Nov 2006 @ 11:01 PSTToolsReplyfexp data doubtThe datatype of the result of TRIM is VARCHAR, so the exported record has a two-byte binary length field in front of the character data. For this specific example, it's easy enough to CAST the valu...
9120 Nov 2006 @ 11:35 PSTToolsReplySpace required for a Multiload JobAlso note that the worktable rows are hash distributed on the PI of the target. Check for skewing - if any one AMP runs out of space, then there is "No more room in database".And don't forget that ...
9015 Nov 2006 @ 04:07 PSTUDAReplyDynamically update timezone.Best solution may be to use TIMESTAMP WITH TIME ZONE datatypes and explicitly provide the appropriate time zone offset as part of the input. Alternatively if all data for a particular session comes...
8909 Nov 2006 @ 09:20 PSTDatabaseReplyRDBMS failure in Macro Build: 3524, The user does not have CREATE MACRO access to database...Could this be the first attempt to run FastLoad on a newly-initialized (sysinit) database? If so, DIP scripts probably still need to be run to finish the initial setup.
8809 Nov 2006 @ 08:55 PSTConnectivityReplyTerada ADODB performance issue.If it's the Connect method that's taking too long, be sure you have the latest version of the driver and particularly the latest version of the shared TeraGSS component.Name resolution (DNS) may al...
8708 Nov 2006 @ 11:52 PSTTrainingReplyDifference Between CURRENT_DATE() and DATECURRENT_DATE [no parentheses] is ANSI SQL and should be used for new development. DATE is old Teradata-only syntax retained for backward compatibility.
8608 Nov 2006 @ 11:48 PSTAnalyticsReplyCalling sql using UNIXIf you don't want the shell to do substitution you can either escape individual "problem" characters with a backslash or put the entire text in single quotes:... Sel cast((ABC / 12 \* 1000 ) as dec...
8508 Nov 2006 @ 11:42 PSTConnectivityReplyODBC HY000: User Defined Function source on the client is not supported by the driverAs the message says, you can't do this via ODBC (e.g. using SQL Assistant). Source files on the client are supported only with the CLI driver (e.g. using BTEQ or BTEQWIN).
8408 Nov 2006 @ 11:27 PSTDatabaseReply2616 : Numeric overflow error during computationIn most cases I would recommend the first option; but the second may actually perform better if the table is small or a high percentage of the rows match.
8307 Nov 2006 @ 02:45 PSTDatabaseReply2616 : Numeric overflow error during computationNo, if you "hardcode the values", the SQL statement would actually read:SELECT A_AVL_PTC_WK FROM FMA_DDBO.TFMA170_PRDPTCSTA WHERE I_LVE_EVT IN ('18031,19820') FOR READ ONLYSince I_LVE_EVT is numeri...
8203 Nov 2006 @ 01:07 PSTAnalyticsReplyconversion of datatypeTeradata does not currently have a native type that supports exact numeric values with over 18 digits precision.This would be a good application for a UDT and an aggregate UDF that computes a "SUM"...
8101 Nov 2006 @ 05:13 PSTAnalyticsReplyconversion of datatypeLooks like the implicit conversion from VARCHAR to a numeric type (required for SUM) is using FLOAT.First step would be to explicitly CAST the VARCHAR back to DECIMAL(18,2). So it could be as simpl...
8031 Oct 2006 @ 05:50 PSTDatabaseReplyPrepare statement in a stored procedureYou can't do PREPARE but you can execute a text string as a dynamic SQL statement via CALL DBC.SysExecSQL(). There are restrictions on what SQL statements are allowed, but it may satisfy your requi...
7931 Oct 2006 @ 05:38 PSTAnalyticsReplyCall a macro from a stored procedure?Clearest statement I see:Chapter 1: SQL CursorsTypes of CursorsCursors can be classified in several different ways:1 Dynamic2 Macro3 Request4 Selection5 Stored procedure6 Positioned (updatable)7 No...
7831 Oct 2006 @ 05:16 PSTToolsReplyViewing Fastload ErrorsOh, I didn't pick up on the fact that your input was FORMAT VARTEXT with TAB delimiters. The DataParcel field is the record sent to Teradata, but that is after FastLoad client converted the origina...
7731 Oct 2006 @ 09:25 PSTAnalyticsReplyCall a macro from a stored procedure?DECLARE CURSOR (Macro Form) documentation detail does say it can be used within a Stored Procedure, but I think that is a documentation error. The SP section of the documentation is fairly clear th...
7631 Oct 2006 @ 09:06 PSTToolsReplyViewing Fastload ErrorsI would use BTEQ (RECORDMODE, DATA options as in your example) because the table should be small. But FastExport (FORMAT UNFORMAT, MODE RECORD) would work too. Either way, since DataParcel is VARBY...
7530 Oct 2006 @ 05:18 PSTToolsReplyViewing Fastload ErrorsExport only the DataParcel column (don't use SELECT *), then remove (or ignore) the first two bytes from each record in the export file.
7429 Oct 2006 @ 01:38 PSTDatabaseReplywhether row hash changes when new nodes or Amp added?Correct. You should find: HASHROW(...) does not change HASHBUCKET(HASHROW(...)) does not change HASHAMP(HASHBUCKET(HASHROW(...))) does change for some values
7328 Oct 2006 @ 07:48 PDTDatabaseReplyError table suffix generated during alter functionNo. You can RENAME it afterwards, but can't change the name used by ALTER.
7228 Oct 2006 @ 07:47 PDTDatabaseReplywhether row hash changes when new nodes or Amp added?RowHash does NOT change. Only HashMap (which RowHash values go to which AMP) changes.

Pages