Need Analytical window query help - response (6) by Sayandeep
SEL ID , STATUS , DT , MAX(STATUS) OVER(PARTITION BY ID ORDER BY DT ROWS 1 PRECEDING) AS COL1 , MIN(STATUS) OVER(PARTITION BY ID ORDER BY DT ROWS 1 PRECEDING) AS COL2 , CASE WHEN COL2 <> COL1...
View ArticleUsing XML shredding : Natural keys, SurKeys - forum topic by jld@fitc
Hi there, I am currently investigating how to use the XML shredding functions of Teradata. In the documentation, it shows you have to create the target E/R model wherein the shredding output would be...
View ArticleHow to get the name of a table from an Insert, Update or Delete SQL without...
Table name is available for SELECT query results from the ResultSetMetaData.getTableName method. But there is no easy way (and no JDBC API method) to obtain a table name for an INSERT, UPDATE, or...
View ArticleDELETE command - forum topic by Kiruthi
Hi, I have a table with 20 million records. I need to delete 10 million records out of the 20 million records. I dont have any key columns in the table.Can anyone please tell me the command to delete...
View ArticleSelect statements to get metadata - response (3) by WindwardAdmin
Thank you for the pointers. Does that include the primary key a foreign key points to? Sorry to bombard for questions but I can't do any queries until we get the sample DB running. We've been trying to...
View ArticleDisconnected sessions not releasing from PE - forum topic by vidyadutt.s
We have a user who attempts to logon to Teradata from an application with wrong password. While checking in the LogonOff table, we do not see any successful logon from the user. However, when checking...
View ArticleDELETE command - response (1) by M.Saeed Khurram
There is a similar topic where dnoeth has answerd this question. the URL is as follows:http://forums.teradata.com/forum/database/delete-xxx-rows-with-teradata You can use this query with the following...
View ArticleSelect statements to get metadata - response (4) by dnoeth
Di Dave, for playing around there's Teradata Express for VMWare: http://downloads.teradata.com/download/database/teradata-express/vmware Regarding Foreign Keys you might notice that most customers...
View ArticleSQL Workaround - response (4) by kelvsdotph
Raja, Thanks, I'll try that out. For everyone's record, what i did was a query rewrite. I found some columns that can be used to link together. Hopefully I can get a smiling face from my client...
View ArticleSQL Workaround - response (5) by dnoeth
Ok, 48m is not really "fairly small" :-) Are the tables partitioned? Do you actually join all rows or are there some common filtering conditions? How often are those tables accessed? What other tables...
View ArticleSelect statements to get metadata - response (5) by WindwardAdmin
Hi Dieter; First off, we're trying to install the AWS demo (we don't have a VMWare server, just Hyper-V). We're installing it for the 4th time. Hopefully this time it will work. Second, how do I get...
View ArticleSQL Workaround - response (6) by dnoeth
A query rewrite where you change the join-columns will usually change the result set :-) Can you elaborate on this? Dieter
View ArticleSelect statements to get metadata - response (6) by dnoeth
Hi Dave, you can probably convert the files from VMWare to Hyper-V, most virtualizers can do that: http://technet.microsoft.com/en-us/library/hh967435.aspx The logical model is not stored in the...
View ArticleDate and Datetime in join - forum topic by sam99
Hi Team, Do I need to cast Datetime column to Date when used in join? It seems I am getting same results with/without cast With Cast: ON...
View ArticleDate and Datetime in join - response (1) by dnoeth
Hi Sam, i did that CAST for many years, too :-) And then i investigated what was ment to be a bug (similar to your example) and finally found a place in the manual where is stated that when you compare...
View ArticleDate and Datetime in join - response (2) by sam99
Thanks for the response Dieter. As I understand the join is no better due to the implict CAST.
View ArticleHow to get the name of a table from an Insert, Update or Delete SQL without...
Thanks ahead of time for your helpful response 1. The output of EXPLAIN appears to be a bit too much to attempt to parse. 2. SHOW QUALIFIED does look managable. I have a question: Lets take for example...
View ArticleSelect statements to get metadata - response (7) by WindwardAdmin
Hi Dieter; If the PK:FK relationships aren't in the metadata somewhere, how do you enforce them? That's a fundamental attribute of a database being consistent. ??? - thanks - dave
View ArticleSelect statements to get metadata - response (8) by dnoeth
Hi Dave, of course a database should have consistent data, but even with PK/FK/CHECKs there might be some bad data in a source system or it's only consistent within a single source system, but you load...
View ArticleSQL Workaround - response (7) by kelvsdotph
Yes, Dieter, that's what I need to test now - to see if the rewrite did change the resultsets. I do found out that there are joins to NUPI columns and count of distinct is around 30% less than the...
View Article