OLAP SQL - running count/total - forum topic by deven_rk
Hi All, We have the below data and using an SQL not procedural code, I would like to get the output as given below for 'out_count', it would help if we could do it using OLAP functions with Preceding...
View ArticleOLAP SQL - running count/total - forum topic by deven_rk
Hi All, We have the below data and using an SQL not procedural code, I would like to get the output as given below for 'out_count', it would help if we could do it using OLAP functions with Preceding...
View Articlelog file after shutdown - forum topic by knowledge
Hi, i need to have a complete log for the system and users activities on ASTER. i need it because after a shutdown in the weekend, i think for too many sessions or too many work space used, i can't...
View ArticleTPT Multiple JobVar files - forum topic by ColinPretty
Hi there, I'm new to TPT and have got it working. I'm wanting to use Job Variable files to house things such as username and password and have got this working with the main script by using tbuild -f...
View ArticleHow to return the result of a select query in a function - forum topic by...
Hello to everybody, I'm trying to return the result of a select query in a function. Something like: REPLACE FUNCTION F_SIGUIPUNTERO_F (nPunt number, nLimite number) RETURNS int LANGUAGE SQL CONTAINS...
View ArticleOLAP SQL - running count/total - response (1) by nealvenna
Below is the solution and answer is inspired from Dieter Answer from the link below https://forums.teradata.com/forum/database/olap-function-csum-sum-with-reset-value select cal_date,...
View ArticleOption "User Choice (includes DBC)" not available in Teradata Studio 15.11 -...
Is the "Show Databases and Users In Hierarchical Display" box checked? If so, uncheck that, and then "User Choice" should be available as an option.
View ArticleTeradata block storage - response (1) by ToddAWalter
The rows in the data blocks are not sorted, they are just placed at the end of a heap of storage. The block contains an index list though which is ordered by the rowid. Likewise the blocks are not...
View ArticleTerdata Studio Express laggy on mac - response (5) by fgrimmer
Jing, It sounds like you have tried a lot of the suggestions! We hope to have fixed the SQL Editor issue in our upcoming 15.12 release (due out this week), regarding a double-click problem....
View ArticleOption "User Choice (includes DBC)" not available in Teradata Studio 15.11 -...
Xinyu, A response was posted by Angela, but it was "unpublised" for some reason, so I will repeat what the solution is: Make sure that the "Show Databases and Users in Hierarchcial Display" is...
View ArticleArcmain - forum topic by arteaga7
I need to perform a database backup but I am not able to find a place to download the tool or a package containing the tool. I think it might be included in a previous version of the utilities but I am...
View ArticleConverting Unix/EPOCH time to PST - forum topic by manish237
I have a column in my teradata table which stores timestamp in UNIX/EPOCH form. I want to run a query and get the corresponding Date in PST and number of records against that date. I got the following...
View ArticleTPT Multiple JobVar files - response (1) by feinholz
Yes, TPT does support multiple job variable files. You just add additional -v <filename> command line options to the command line. This feature was implemented recently (targeted for 16.0), but...
View ArticleCreating a Dynamic YoY Date Range in Case Statement for Current Quarter QTD -...
Thank you Dieter this works!
View ArticleSyntax - forum topic by SGIT
I am getting the following error : SPL1027:E(L7), Missing/Invalid SQL statement'E(3706):Syntax error: expected something between the word 'StartDate' and the 'DATE' keyword.'. Looks like a syntax error...
View ArticleFind blocking sessions and tables - forum topic by teradatauser2
Hi, In our environment, we have an application that runs queries and they block each other for some tables. I want to know which all sessions and which all tables are in blocked state with that ID? i...
View ArticleFind blocking sessions and tables - response (1) by teradatauser2
I see the values as blk3objdbid = 1 and blk3objtid = 102, screenshot attached
View ArticleBTEQ:saving output in multiple file - forum topic by vc
Hello All. I am writing a bteq which is saving the output in the One file.Bteq has 3 different queries. I need to save outout of all the three queries in three seprate files using one BTEQ.is it...
View ArticleFind skew with perm over 1gb - forum topic by vc
Hello, I am using the below query SELECT cast(DatabaseName as char(30)), cast(Tablename as char(40)), (100 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100) (FORMAT 'zz9.99') )AS Skewfactor_greater_90, cast...
View ArticleFind skew with perm over 1gb - response (1) by AtardecerR0j0
SELECT cast(DatabaseName as char(30)), cast(Tablename as char(40)), (100 - (AVG(CURRENTPERM)/MAX(CURRENTPERM)*100) (FORMAT 'zz9.99') )AS Skewfactor_greater_90, cast (CURRENT_date as timestamp(0)) +...
View ArticleSystem Table for Compression - forum topic by agts
Is there any way for finding compressed columns in database with there values, like system table for compression columns and values? using Select * from dbc.columns where compressible like 'C%'; I can...
View ArticleSystem Table for Compression - response (1) by agts
got it. CompressValueList in dbc.columns can be use for same
View ArticleDrop Table blocked by Read lock session which is not on the machine. - forum...
Hi All,I having an issues, while Dropping a backup table, The drop tables session(Session ID 59678567) is blocked by read lock of some other session (2463583 USER: ALL), this blocking is not even...
View ArticleTeradata block storage - response (2) by pandit
Thanks a lot for the reply Todd. It was really helpful. Just to revise, say on block level, data will be just apended to blocks whereas the index will be in sorted order for performing binary search....
View ArticleWorking with XMLTABLE, problem extracting data where elements have no...
I am working on an XML parsing requirement using XML Table. I am running into a problem with data from elements with no namespaces or prefixes. Extraction using XMLTable doesn't seem to work....
View ArticleCollect Stats with insert statement - forum topic by Aganediwal
Hi all, I am using below two statements to create table and insert some data from an existing table. Is there a way in which stats will be automatically collected after insert statement completes or a...
View ArticleHaving an Issue with CHAR,VARCHAR,DATE Data types while exporting/importing...
Hello, I am trying to Import/Export Tables from/to Teradata into Hive. But If Hive table has CHAR/VARCHAR/DATE data types, I am getting below error from TDCH Connector INFO tool.ConnectorExportTool:...
View ArticleCompute with immediate previous row value derived - forum topic by deven_rk
Hi All, I have the below data, wherein I want to compute 'Amount' data dynamically in a 'Select' statement as given below, here I want to refer the previous row value, apply an equation, compute a new...
View ArticleCompute with immediate previous row value derived - forum topic by deven_rk
Hi All, I have the below data, wherein I want to compute 'Amount' data dynamically in a 'Select' statement as given below, here I want to refer the previous row value, apply an equation, compute a new...
View ArticleTeradata block storage - response (3) by ToddAWalter
Correct. The row index list is just a set of offsets from the beginning of the block rather than a pointer but the effect is the same.
View ArticleFind blocking sessions and tables - response (3) by teradatauser2
Could anyone please help me on this ? --samir
View ArticleArcmain - response (2) by arteaga7
What does T@YS mean? Do you have a sample script you use to backup a teradata database instance?
View ArticleCompute with immediate previous row value derived - response (1) by...
Let say your table has first record (2016-11-01, 1000) then you can run the below SQL once everyday which will calculate new Amount and insert it into the same table. INS into dbname.Amt_tbl Sel...
View ArticleConverting Unix/EPOCH time to PST - response (1) by tomnolan
You said that you wanted to get the "PST date", but time zones are not associated with DATE values. In other words, the Teradata Database does not offer a DATE WITH TIME ZONE data type. Your outermost...
View ArticleArcmain - response (3) by VandeBergB
T@YS = Teradata At Your Service Somebody in your organization, probably the lead DBA should have an account set up to download all the wonders of TD documentation, hotfixes and new releases...
View ArticleFind blocking sessions and tables - response (4) by abhishek.jadhav
You can use following functions to map the ids to names IdentifyTable IdentifyDatabase dbid=1 is for DBC tid=102 is for AccessRights table
View Articlevolatile tables inside the stored procedure - forum topic by SGIT
Hello, I have the following two questions please: 1) While creating a volatile talbe inside a stored procedure : it needs to be created first outside the SP and then again inside. I am doing this...
View ArticleCompute with immediate previous row value derived - response (2) by dnoeth
Your calculation is similar to 1000 * 1.1 ** (row_number() over (order by Date)-1) To get he start value you might trymin(Amount) over () * 1.1 ** (row_number() over (order by Date)-1) or...
View ArticleFastLoad - Data Conversions - forum topic by ZAtkinso
Hello, I am having issues performing data conversions specially with dates and timestamps while using fastload. My script is pasted below. All my rows are being imported and sent to error_1 table...
View ArticleFind blocking sessions and tables - response (5) by teradatauser2
Thanks Abhishek, it works.
View ArticleFastLoad - Data Conversions - response (1) by feinholz
To which type of data conversions are you referring? The FastLoad script is just loading data. Teradata expects the Date/Time/Timestamp data to be in a very specific format. If the incoming data does...
View ArticleFastLoad - Data Conversions - response (2) by ZAtkinso
Hey Steve, I am exporting the data from the same table. Creating a new empy version of the same table and fastloading the data that was exported from the original table. I am working on a tool to...
View ArticleFastLoad - Data Conversions - response (3) by ZAtkinso
Sorry to double post but I believe I side stepped your question. The data in the exported file is DATE with FORMAT 'YY/MM/DD'. The table has this same type and format. However, as I understand RECORD...
View ArticleCollect Stats with insert statement - response (1) by abhishek.jadhav
A third statement for collecting stats is required.
View ArticleCollapse one to many into one SQL query result row - forum topic by...
I would like to collapse records from a one to many relationship down into a single query result row, a task can have one or two resources assigned (there is no limit on the number of resources that...
View ArticleFastLoad - Data Conversions - response (4) by feinholz
FastExport itself cannot export the data and write it out in delimited format. So, I guess you must be CASTing your SELECT statement. Do you have to use SQLAssistant? Have you tried TPT? Can you...
View ArticleConnectivity issue - response (3) by cheese03
Has you been able to resolve this issue? I am getting the exact same error? Even with the permissions on the file set to 0555,0777,4100 and 4100.
View ArticleWorking with XMLTABLE, problem extracting data where elements have no...
Ok, after some experimentation, I think I fixed the issue... As I've mentioned, the above code is just mocked code I prepared for the purpose of demonstrating my issue. There is actually a defined...
View ArticleTPT Multiple JobVar files - response (2) by ColinPretty
I did forget to mention that I'm on 14 (soon to be upgrading to 15). I'm guessing that means I can't do it as yet, so I'll hold fire until then. Thanks for the response Steve.
View Article