#DateForumTypeThreadPost
35318 Sep 2008 @ 05:03 PDTDatabaseReplyCREATE TABLE AS ... WITH DATA AND STATISTICSHi Andrew,the rules are explained in detail inSQL Reference: Data Definition StatementsChapter 3: SQL Data Definition Language Statement Syntax (CREATE TABLE - CREATE VIEW)CREATE TABLE (AS Clause)D...
35218 Sep 2008 @ 04:50 PDTDatabaseReplyLinking a Table name to a table IdSELECT * FROM dbc.COLUMNSWHERE columnname IN ('tvmid', 'tableid')You have to check if you got select rights on any of those rows returned, because most of them are from base tables.Dieter
35103 Jun 2008 @ 02:32 PDTDatabaseReplyCase in SELECTNo DBMS i'm aware of will be able to use an index for that case statement, sorry.Dieter
35003 Jun 2008 @ 11:35 PDTDatabaseReplyAlias name cannot match another table/alias name in FROM ClauseYou should be glad about that error message ;-)Your query is an 8-table mixing SQL89 and SQL92 style joins, it would result in cross-joining the result sets of those inner joins.You probably wanted...
34903 Jun 2008 @ 09:26 PDTDatabaseReplyFew basic queriesThere's the Standard SQL EXTRACT function to retrieve parts of a timestamp like YEAR/MONTH/DAY/HOUR/MINUTE/SECOND as an integer. That function also exists in Oracle.WEEK and QUARTER is not implemen...
34803 Jun 2008 @ 09:15 PDTToolsReplyInstances in TPT"If per say Instances were replications of the complete process then why dont they use multiple loader slots."Because they communicate through sessions to the Teradata system, it's like a multi-thr...
34703 Jun 2008 @ 04:09 PDTToolsReplyInstances in TPTCheck the manual:Teradata Parallel Transporter ReferenceChapter 4: Teradata PT Job ScriptsDefining Sessions and Instances1 job -> 1 or many instances 1 instance -> 1 or many sessionsIf there'...
34603 Jun 2008 @ 03:53 PDTDatabaseReplyKill channel-attached host sessionsHi Mario,there's an ABORT SESSION within the Database window.Dieter
34503 Jun 2008 @ 03:37 PDTDatabaseReplyMacro does not work when converted into stored procedureHint: *ALL* single quotes within a string must be replaced by two single quotes.But i got two additional quetsions:1. Why do you want to put that into a SP? You don't use any additional SP features...
34403 Jun 2008 @ 03:23 PDTDatabaseReplyFew basic queriesHi Koushik again,regardig your previous questions:"4. select * from CDP_DRV_0.dim_carr where rownum < 2;"select top 2 * from CDP_DRV_0.dim_carr where rownum < 2;"5. Is analytical function the...
34303 Jun 2008 @ 03:13 PDTDatabaseReplyFew basic queriesHi Koushik,there are three different dataypes in Teradata/Standard SQL:- DATE, just the date - TIME, just the time, optionally WITH TIME ZONE- TIMESTAMP, date plus time, optionally WITH TIME ZONEOr...
34202 Jun 2008 @ 08:12 PDTDatabaseReplyAccess Logging versus DBQLHi tvrprice,what problem do you have in mind? You just get multiple rows within DBQL as you get multiple rows within AccessLog.But if the AccessLog is used for security reasons, i'd recommend stayi...
34102 Jun 2008 @ 07:58 PDTDatabaseReplySimple QueryHi Monika,did you try dhirajpalse's suggestion, it's working:SELECT emp_id FROM emp a WHERE (11 <= (SELECT emp_no FROM emp_sk WHERE emp_id = a.emp_id AND skill = 'AC_DT_TS') AND15 >= (SELECT ...
34002 Jun 2008 @ 07:12 PDTDatabaseReplyThe proper order of Parantheses,And operators,Not operators,OR operatorsAny programming language uses the same order of evaluation:(),NOT,AND,ORDieter
33902 Jun 2008 @ 07:09 PDTDatabaseReplyCase in SELECTYou can't use an index for your case statement, because it can't be rewritten and i doubt, that any DBMS will use an index for that.Anyway, your example should use an index, because renaming a calc...
33801 Jun 2008 @ 03:39 PDTDatabaseReplyCase in SELECTAny calculation based on an indexed column will not use any index, you have to rewrite it as a SARGable condition:e.g. "indexed_col + x = y" -> "indexed_col = y - x"Could you post that CASE?Dieter
33727 May 2008 @ 03:31 PDTTrainingReplyabout TD12.o DEMO passwords.Hi Anil,there's a help file (tdexpress.chm), just search that for "password" you'll find "Database User Details" Dieter
33627 May 2008 @ 03:19 PDTDatabaseReplyTeradata QueryHi Monika,Adeel already gave you he correct answer:COALESCE returns the first parameter which is not null, you just have to adjust it to your needs.Dieter
33527 May 2008 @ 03:15 PDTToolsReplyHow to read Teradata SQL Syntax notation?In each SQL manual there's an appendix "Notation Conventions"Dieter
33420 May 2008 @ 07:04 PDTAnalyticsReplyStandardizeHi Scott,AFAIK the standardize function should return the same as (x-mean)/standard_dev.mean -> AVGstandard_dev -> STDDEV_SAMP if it's based on a sample, else STDDEV_POPIf you need it for eac...
33315 May 2008 @ 10:38 PDTDatabaseReplyIs the popular opinion that DELETE ALL doesnt use the Transient Journal true?It's not an "opinion", it's the truth, but you don't need the ALL :-)Right now i don't want to explain in detail, just search the manuals for "fast path delete"Dieter
33215 May 2008 @ 02:06 PDTAnalyticsReplyRank() function Selected Non Aggregated Value must be part of the associated groupHi Mike,there's probably an Aggregate/GROUP BY within your query and OLAP functions are processed *after* that.If you still need help, please post your query...Dieter
33114 May 2008 @ 03:02 PDTDatabaseReplyTeradata QueryHi Monika,in that case you have to nest OLAP functions:SELECT emp_id, enter_sequence, enter_gate, MIN(CASE WHEN enter_sequence = minseq THEN enter_gate END) OVER (PARTITION BY emp_id) AS firs...
33014 May 2008 @ 02:49 PDTDatabaseReplyDropping Unnamed Primary ConstraintHi Teju,dropping an unnamed constraint is just using the same as adding it: ALTER TABLE DROP PRIMARY KEY(C01)But in your case this will not work, because it has been implemented as UPI on that tabl...
32914 May 2008 @ 12:31 PDTConnectivityReplyMode FunctionHi Siinis,SELECT colFROM tabGROUP BY 1QUALIFY RANK() OVER (ORDER BY COUNT(*) DESC) = 1Dieter

Pages