#DateForumTypeThreadPost
77820 Jul 2010 @ 03:38 PDTGeneralReplyImport Bteq ErrorYou defined the wrong import mode, you need VARTEXT, because it's a delimited text file: .import vartext ';' file=C:\extraction.txt You have to specify VARCHARs for all your input columns (btw,...
77719 Jul 2010 @ 01:22 PDTToolsReplyHelp Needed on bteq export/import optionYou specified DATA in your expart command. This is Teradata's internal binary format, e.g. INT -> 4 byte, FLOAT -> 8 Byte IEEE format Of course you could export/inport text, but DATA or IND...
77619 Jul 2010 @ 04:07 PDTDatabaseReplyCreating Stored Procedures in Batch"I have a stored procedure to run a sequence of DDL statements, this apparently is not allowed unless the DLL is completed with ET." Any DDL statement must be immediately commited in Teradata, a...
77519 Jul 2010 @ 03:50 PDTDatabaseReply<Error> value for a field"source data contains single or double blank" What format is the source data? Binary or readable text? What's the datatype in DEFINE? Char or Varchar? "this column is populated with '' "...
77418 Jul 2010 @ 09:53 PDTDatabaseReplyviewsNo, you can't do that in Teradata. Dieter
77315 Jul 2010 @ 09:46 PDTDatabaseReplyJoin where second table has dupes!"How can I join these 2 tables and get both records in the second table?" Simply joining them? What do you actually want? Join STORY_OUT to only one of the rows in CSA? This fits to your...
77207 Jul 2010 @ 11:25 PDTDatabaseReplyCreating a PercentageHi Paul, there are some rules regarding calculations and rounding on decimals. precision: - dec(n1,m1) / dec(n2,m2): the resulting datatype has a precision of max(m1,m2), same rule for +,-,MOD...
77102 Jul 2010 @ 02:00 PDTDatabaseReplyConditional Distinct CountThis is probably the easiest solution, just some remarks: Don't concat that counting_unit, this is unnecessary overhead. And use ROW_NUMBER instead of RANK (unless you can guarantee there's no ...
77002 Jul 2010 @ 01:51 PDTDatabaseReplyHow to get the amount of data?You can only get the row count per partition and calculate a percentage based on that, untested: select partition, cnt, tabsize * cnt / sum(cnt) over () from ( select partition, count(*) ...
76902 Jul 2010 @ 01:46 PDTDatabaseReplyHelp reqd on Partition KeyThe UNKNOWN partition is used for NULLs. There's also NO RANGE for dates outside of the specified range. Dieter
76802 Jul 2010 @ 01:44 PDTDatabaseReplyThe same user already logged on to DBS...The user used for the COPY must not be logged on using any other session: ARC0700 The same user already logged on to DBS Explanation: An attempt to run an Archive & Recovery statement under t...
76702 Jul 2010 @ 01:42 PDTDatabaseReplyImport Teradata Backup in to SQL ServerAFAIK datablocks are directly copied as is in a Teradata backup. So there no way to read that (and no third party tools as for SQL Server). Dieter
76602 Jul 2010 @ 01:39 PDTDatabaseReplyUsing stored procedure variables in a SAMPLE clauseYou can't pass the sample size as a parameter. The only way is to construct a string and submit the SQL using dbc.sysexecsql. Dieter
76502 Jul 2010 @ 01:36 PDTDatabaseReplyIdentifying Status of CALL to Stored Proc?Hi JK, in TD13 there's SIGNAL and RESIGNAL to throw errors in SPs, but i didn't try that yet. In the SP Orange Book there's an example using an External SP to throw an error. But the error cod...
76402 Jul 2010 @ 01:20 PDTDatabaseReplyHow to make a dump in Teradata ?It's the "Teradata Archive/Recovery Utility" manual, you'll find it at www.info.teradata.com Dieter
76302 Jul 2010 @ 12:56 PDTAnalyticsReplyhashrow functionDo a SHOW TABLE and check the character set. It's LATIN whereas any literal is always UNICODE. select hashrow(translate('1234_#abcd@gmail.com' using unicode_to_latin)) Dieter
76220 Jun 2010 @ 12:03 PDTDatabaseReplyIs is possible to use Aggregate functions inside CASE statement?This query is sytactically correct and should run without problems. Dieter
76120 Jun 2010 @ 12:01 PDTDatabaseReplyQuery verrry slowCan you post some more details? - Create Table (but at least PK/PI) and rowcounts for each table. - Plus Explains of both queries. Dieter
76018 Jun 2010 @ 11:08 PDTDatabaseReplyQuery verrry slowIf the batch_id is unique there's no need for distinct. Dieter
75918 Jun 2010 @ 10:30 PDTDatabaseReplyQuery verrry slowThis is the query i already posted, i just made a mistake in the where-condition: where cast(start_dt as date) < current_date - 7 Dieter
75818 Jun 2010 @ 09:13 PDTDatabaseReplyQuery verrry slowThis query is going to run for a long time, so you better shouldn't submit it :-) You're joining to the calendar table without any join condition -> cross join to ∼ 73k rows. If you check Exp...
75717 Jun 2010 @ 07:05 PDTDatabaseReplyDELETE FROM PPI - VERY SLOWThe delete will be fast if it's deleting a full partition (similar to a fast-path delete without where-condition). But in your case it's just a one day out of 7 so it must Transient Journal those ...
75617 Jun 2010 @ 07:00 PDTUDAReplyTeraData vs OracleHi Riccardo, there's no conversion neccessary, it will run as is, only "alias" is a reserved name in TD, so it must be put in double quotes. Of course it might be better to split it into 2 sepa...
75515 Jun 2010 @ 10:54 PDTGeneralReplyPrimary Index Reducing SpaceWas it really a NOPI-table in TD13 defined with NO PRIMARY INDEX or did you just omit the PI definition? What does a SHOW TABLE return? If it actually was a NOPI table then there migth have be...
75415 Jun 2010 @ 08:25 PDTDatabaseReplyMulitple Row values into a sinlge Column...Two ways to achieve that result set: select paycode1 from tab where paycode1 '' union all select paycode2 from tab where paycode2 '' union all ... or a Cross Join to a helper table: se...

Pages