#DateForumTypeThreadPost
80315 Sep 2010 @ 10:53 PDTDatabaseReplynull handling in substr built in functionOracle does not distinguish between a zero-length VARCHAR string and NULL, this is a well-known Oracle bug/feature :-) And Oracle's SUBSTR has different rules, e.g. for negative start positions....
80209 Sep 2010 @ 08:10 PDTDatabaseReplyHow to find the Continious records based on Key column.Hi Amit, looks like you don't want gaps, you want to densify the data: SELECT grp, MIN(start_dt), MAX(end_dt) FROM ( SELECT grp, start_dt, end_dt, SUM(flag) OVER (PARTITION BY grp ORDER...
80109 Sep 2010 @ 07:27 PDTDatabaseReplyBTEQ script helpThere are no built in loops in BTEQ, so you have two possibilities: - Do the loop in the unix shell, but then you have to logon several times. - repeat the same stuff 5 times in BTEQ. .logon...
80009 Sep 2010 @ 07:12 PDTToolsReplyHow to change a date column to show only month and yearHi Maria, you can use BTEQ's FORMAT, you just have to add a cast to CHAR: select income_month (format 'yyyy-mm') (char(7)) Dieter
79907 Sep 2010 @ 02:56 PDTDatabaseReplyHow to use rank in update stmtUse an UPDATE ... FROM (your select to calculate the ranks) Dieter
79807 Sep 2010 @ 02:53 PDTDatabaseReplyHow to group a paricular column in a row of data, so that it could be used as in coaleseI really don't understand your question, but you can use CASE to return NULL for unwanted values, like: coalesce(min(case class when 'first' then rate end), min(case class when 'second' then ra...
79707 Sep 2010 @ 02:43 PDTExtensibilityReplyQuerying XML Data stored in the databaseXML Services doesn't support XQuery, but XPath functions can be used against XML CLOBs. This is an example accessing DBQL data stored as XML in dbc.dbqlxmltbl (TD13): select queryid as Query...
79604 Sep 2010 @ 02:58 PDTDatabaseReplySoft RIHi Adeel, what do you mean by "more effort and more CPU time for processing the same data-set"? Soft RI is a dummy, which is not checked by the DBMS. Karam, you answered your own question: ...
79504 Sep 2010 @ 02:46 PDTDatabaseReplyuse of coalesce in Tera dataA TOP query without ORDER BY returns a random row (actually not random, but not the "last"/"first"/"highest") Are you at the same site as this guy? http://forums.teradata.com/forum/general/tera...
79404 Sep 2010 @ 02:38 PDTGeneralReplyTeradata equivalent Query of SQL ServerStrange query: - if cp2_eff_dt/EFF_DT is actually a datetime in SQL Server, then why it's coalesced with an integer zero? - it's all rows from CAP_SAC_CP211 or none, but it's kind of random, b...
79328 Jul 2010 @ 01:08 PDTToolsReplyERRLIMIT ignored in MLOAD scriptThe throughput for loading 6377 rows of approx. 200 bytes will not change if you use 1 or 20 sessions. But if you load those 6377 rows on a large system without specifying the number of session...
79228 Jul 2010 @ 01:00 PDTDatabaseReplySpool treatment for DISTINCT versus GROUP BYAs i can't attach a PDF i try to copy some of it and hope i can make it readable: Explain Distinct: 3) We do an all-AMPs RETRIEVE step from ... by way of an all-rows scan with no residual co...
79127 Jul 2010 @ 06:06 PDTDatabaseReplySQL HistoryHi Flavien, - I'm currently logging for every user, but does it also logs every database or just one ? the querylog is not based on accessed databases (this might be done with AccessLog), but o...
79027 Jul 2010 @ 04:54 PDTGeneralReplyQuery to List the Alphabets in EnglishI would simpy use a table with all the neccessary characters in it. It's like a calendar table, you fill it once and that's it. Or you might write a Table UDF. Btw, you post about Prime Numb...
78927 Jul 2010 @ 04:34 PDTDatabaseReplyHelp With JoinsThe data provided looked like preknown values/number of values, for this it's the right query. If the values are unknown, but maximum number of rows per value is low/known and you just need a kind...
78827 Jul 2010 @ 03:54 PDTDatabaseReplySpecify datablock size, Percent freespaceHere it is, just copied straight from the manuals :-) CREATE TABLE Employee, DATABLOCKSIZE = 16384 BYTES, CHECKSUM = LOW, FREESPACE = 10 PERCENT, (EmpNo SMALLINT FORMAT ’9(5)’ CHECK (Em...
78727 Jul 2010 @ 03:49 PDTDatabaseReplyHelp With JoinsAs you already wrote you need to join the same table twice: select from emp_table as e left join address_table as home on e.address_code = home.address_code and address_type = 'home' left ...
78627 Jul 2010 @ 03:45 PDTDatabaseReplySQL HistoryHi Flavien, there are two kinds of logs in Teradata: - AccessLog, mainly a security log, guaranteed to be written, but the souce code logged is limited to 8KB. But you probably want - QueryLo...
78527 Jul 2010 @ 03:36 PDTToolsReplyERRLIMIT ignored in MLOAD scriptThe number of errors might be higher than the specified errorlimit, because that limit is checked *after* a block of rows has been sent to the receiving AMP. You didn't specify the number of sessi...
78421 Jul 2010 @ 06:12 PDTDatabaseReplyPool size?I never heard of a "pool size"? Could you please elaborate what this is supposed to be? The closest word would be "spool size" (regarding the maximum size of a spool during a query), but the "m...
78321 Jul 2010 @ 06:06 PDTToolsReplyHow to load large volumes into existing tables in real-timeThis is not the right place for that kind of question :-) You should contact your Teradata salesperson, they will be able to provide you with some info about number of nodes neccessary for that ...
78220 Jul 2010 @ 09:58 PDTDatabaseReplyVolatile table V/S Perminent tableIf you use a qualified tablename, the parser adds that databasename to the list of default databases for that query. Now you got two default databases, your "default" default DB and DATABASEME a...
78120 Jul 2010 @ 09:55 PDTToolsReplyFLOAD V/S MLAODPreparation/Cleanup in FastLoad is just a part of phase #1/#2, but no separate phase. It's simply a naming convention, you could talk about 2/3/4/5/6 phases whatever :-) In fact MLoad's aqcuisi...
78020 Jul 2010 @ 05:52 PDTGeneralReplyImport Bteq ErrorStrahge, there can't be a deadlock on a volatile table, because there are no locks on it. Could you show your actual BTEQ script and/or it's output? And i noted another problem, you didn't sp...
77920 Jul 2010 @ 03:46 PDTDatabaseReplyGlobal temporary tablesWhen you create a GTT then you actually create a kind of *template*, which is persistent and visible within the Data Dictionary. Thus a GTT is created only once. By submitting an INSERT you mat...

Pages