353 | 18 Sep 2008 @ 05:03 PDT | Database | Reply | CREATE TABLE AS ... WITH DATA AND STATISTICS | Hi 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... |
352 | 18 Sep 2008 @ 04:50 PDT | Database | Reply | Linking a Table name to a table Id | SELECT * 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 |
351 | 03 Jun 2008 @ 02:32 PDT | Database | Reply | Case in SELECT | No DBMS i'm aware of will be able to use an index for that case statement, sorry.Dieter |
350 | 03 Jun 2008 @ 11:35 PDT | Database | Reply | Alias name cannot match another table/alias name in FROM Clause | You 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... |
349 | 03 Jun 2008 @ 09:26 PDT | Database | Reply | Few basic queries | There'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... |
348 | 03 Jun 2008 @ 09:15 PDT | Tools | Reply | Instances 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... |
347 | 03 Jun 2008 @ 04:09 PDT | Tools | Reply | Instances in TPT | Check 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'... |
346 | 03 Jun 2008 @ 03:53 PDT | Database | Reply | Kill channel-attached host sessions | Hi Mario,there's an ABORT SESSION within the Database window.Dieter |
345 | 03 Jun 2008 @ 03:37 PDT | Database | Reply | Macro does not work when converted into stored procedure | Hint: *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... |
344 | 03 Jun 2008 @ 03:23 PDT | Database | Reply | Few basic queries | Hi 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... |
343 | 03 Jun 2008 @ 03:13 PDT | Database | Reply | Few basic queries | Hi 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... |
342 | 02 Jun 2008 @ 08:12 PDT | Database | Reply | Access Logging versus DBQL | Hi 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... |
341 | 02 Jun 2008 @ 07:58 PDT | Database | Reply | Simple Query | Hi 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 ... |
340 | 02 Jun 2008 @ 07:12 PDT | Database | Reply | The proper order of Parantheses,And operators,Not operators,OR operators | Any programming language uses the same order of evaluation:(),NOT,AND,ORDieter |
339 | 02 Jun 2008 @ 07:09 PDT | Database | Reply | Case in SELECT | You 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... |
338 | 01 Jun 2008 @ 03:39 PDT | Database | Reply | Case in SELECT | Any 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 |
337 | 27 May 2008 @ 03:31 PDT | Training | Reply | about 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 |
336 | 27 May 2008 @ 03:19 PDT | Database | Reply | Teradata Query | Hi 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 |
335 | 27 May 2008 @ 03:15 PDT | Tools | Reply | How to read Teradata SQL Syntax notation? | In each SQL manual there's an appendix "Notation Conventions"Dieter |
334 | 20 May 2008 @ 07:04 PDT | Analytics | Reply | Standardize | Hi 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... |
333 | 15 May 2008 @ 10:38 PDT | Database | Reply | Is 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 |
332 | 15 May 2008 @ 02:06 PDT | Analytics | Reply | Rank() function Selected Non Aggregated Value must be part of the associated group | Hi 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 |
331 | 14 May 2008 @ 03:02 PDT | Database | Reply | Teradata Query | Hi 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... |
330 | 14 May 2008 @ 02:49 PDT | Database | Reply | Dropping Unnamed Primary Constraint | Hi 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... |
329 | 14 May 2008 @ 12:31 PDT | Connectivity | Reply | Mode Function | Hi Siinis,SELECT colFROM tabGROUP BY 1QUALIFY RANK() OVER (ORDER BY COUNT(*) DESC) = 1Dieter |