LastAccess Time stamp not getting updated for table - response (3) by sreenu.rnn
Need help!! Extracting year from table Name - response (2) by Fred
Assuming the two-digit years are all 20yy:
CAST('20'||SUBSTRING(TABLENAME FROM CHARACTER_LENGTH(TABLENAME) - 3 FOR 4)||'01' AS DATE FORMAT 'YYYYMMDD')
Note: Use DBC.TablesV. If you use backward compatibility view DBC.Tables, you will need CHARACTER_LENGTH(TRIM(TABLENAME)).
Help with query- I receive error 3504 - response (2) by nhoigal
Thank you :-)
Impact of using BT/ET on set of DMLs for huge volume of data - forum topic by sagargurujula
Hi There
We have a bteq which does DML operation on a set of tables those contains huge volum of data.
Till now we dont have BT/ET mode in the bteq.so each dml request is committed.
if any failure happens in between then the DMLs that are executed before this failure can not be rolled back.
So we want to introduce BT before the start of BTEQ and ET before end of bteq to commit all requests at a time.
Could you please let us know the impacts due to this?
will there be any performance issue can happen because of this?
WHERE clause usage on Left outer join - forum topic by raj_tera
Hi,
I have a question about the usuage of filter condition in WHERE clause vs ON clause of LOJ. My query is -
SEL * FROM
(SEL T1.COL1,T2.COL2,T2.COL4
FROM TABLE1 T1
LEFT OUTER JOIN
TABLE2 T2
ON
T1.COL1=T2.COL1
WHERE T1.COL3=1 AND T2.COL3=1) A
WHERE T2.COL4 IS NULL
is returning expected results, but if I change the WHERE to the ON clause of the LOJ part (like below) , it is returning incorrect records ie., records with T1.COL3<>1 as well.
SEL * FROM
(SEL T1.COL1,T2.COL2,T2.COL4
FROM TABLE1 T1
LEFT OUTER JOIN
TABLE2 T2
ON
T1.COL1=T2.COL1
AND T1.COL3=1 AND T2.COL3=1) A
WHERE T2.COL4 IS NULL
Can someone please explain the difference and let me know which query is correct.
Thanks!
Temporal and fact/dimension joins - forum topic by eric.williams@pnc.com
I am considering using Temporal for an upcoming project. The project will involve a (semantic) dimensional model for reporting.
I have spent a considerable amount of time trying to understand Temporal, and I think I am missing something, because Temporal does not seem to satisfy one of the fundamental use cases needed in a dimensional model. Maybe it does.... but I'm not sure.
How do I apply an AS OF to the dimension based on an event date in the fact? When I join a fact to a dimension, I don't want to apply a single AS OF to the entire join (which appears to be the limitation of the AS OF clause -- it has to evaluate to a single value, I think). Each fact record has to match the dimension record that was valid (business validity) as of the date of the event represented by the fact. (This gets more complicated when you have slowly changing facts, I know, but let's focus on a non-temporal event fact table.)
If I want to run a time-series analysis, each fact record must be associated with the version of the dimension that was valid at the point in time that fact occurred. I know how to do this with traditional dimensional modeling and slowly changing dimensions. But I'd like to see if Temporal can make implementing SCDs simpler.
I'm thinking I could do something like this:
SELECT * FROM MyFact JOIN MyDim ON MyDim.MyDimKey = MyFact.MyDimKey AND MyDim.Validity CONTAINS MyFact.OccurredOnDate WHERE MyFact.OccurredOnDate BETWEEN ... AND ...;
This would seem to achieve the desired result, but it doesn't feel right. Now I've got to worry about whether I'm doing a SEQUENCED or NONSEQUENCED VALIDTIME join (which I haven't thought a lot about yet). I have seem some articles on the internet talking about a concept called AS AT, but that is not valid temporal SQL.
Am I missing something obvious? What is the proper way to join a non-temporal table (with an event date in each row) to a validtime temporal table (where the valid time must be as of the event date in the joined row)?
Thanks for the help,
-eric
WHERE clause usage on Left outer join - response (1) by manib0907
Hi,
The where clause will be applied only after records are fetched. If you apply ON then the join will take into consideration only those records that have those condition satisfied.
Check the below link,it will help.
http://pauldhip.blogspot.dk/2014/05/sql-join-condition-on-where-clause-or.html
WHERE clause usage on Left outer join - response (2) by avilaks
Hi Raj,
The Significance of using Where and ON Clause makes difference only with left outer joins.
Outer Join (Assume Left) would join with all value from left table and then filter values. Depending on where the condition is mentioned, the filtration would happen differently.
In Join: Before joining.Thus there are possibilities of having null values from the right table.(2nd Query)
In where: After joining. Thus, the whole records (after join) would be filtered. (1st Query)
Hope you are clear now.
Free Compression Tool - forum topic by oshun
We developed a free compression tool, which you can download from our website (the documentation, 15 pages, is included)
http://www.dwhpro.com/teradata-compression-3/
Sincerely
Roland
Replacing symbols from input column - forum topic by Moutusi
Hi,
From source I am getting values like '5 T', 'RT', 'S.*09', 'XV-4' etc. My requirement is to remove any space, '*', '-', '.' so that output should look like: '5T', 'RT', 'S09', 'XV4' . Is there any way I can do it in a single step?
Replacing symbols from input column - response (1) by dnoeth
Hi Moutusi,
what's your Teradata release?
oTranslate(col, ' *-.', '') removes those characters.
TPT error - response (4) by newtera7
How did u resolve this..i have the same error..
Teradata Parallel Transporter Version 14.10.00.05
TPT_INFRA: Syntax error at or near line 13 of Job Script File 'MERCHANT_BILLS.ctl':
TPT_INFRA: At ","; "," not in { LPAREN_ SEMICOL_ ALLOW_ APPLY_ ATTR_ ATTRIBUTES_ DEBUG_ DISALLOW_ EXTERNAL_ INSERT_ INFO_ INTERFACE_ LIBRARY_ MSGCATALOG_ NOINFO_ NOT_ NODEBUG_ NOTRACE_ OUTPUT_ RESTARTABLE_ SELECT_ SOURCE_ TRACE_ REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER_ EXTENDED_IDENTIFIER_NO_N_ } in Rule: Column Definition
TPT_INFRA: Syntax error at or near line 14 of Job Script File 'MERCHANT_BILLS.ctl':
TPT_INFRA: At "DESCRIPTION" missing { REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER_ EXTENDED_IDENTIFIER_NO_N_ } in Rule: Regular Identifier
TPT_INFRA: Syntax error at or near line 14 of Job Script File 'MERCHANT_BILLS.ctl':
TPT_INFRA: TPT03022: Rule: Column Definition
Compilation failed due to errors. Execution Plan was not generated.
Job script compilation failed.
Job terminated with status 8.
Different Output When ran a macro in Teradata Sql Assistant and Studio Express - forum topic by Jugalkishorebhatt1
Hello All,
When i ran a macro in Teradata Express studio i got a proper output(Connection Type JDBC), whereas when i ran the same macro in Sql Assistant i am not able to get the complete output.
I am not able to figure. why there is a difference in the output when i run the macro.
Plz help me.
Thanks
Jugal
Teradata command line options - response (2) by krigu543
Can any body send the Exact link to down load VMware+Teradat14.10 complete down load for Windows & OS 32 bit plz
Execute Teradata Stored Procedure from SQL Server - forum topic by Ionescu Logic
Hello,
I need to execute a Teradata stored procedure in SQL Server.
I tried so far the following:
1) exec ('call CIONESCU.stp_agg_3 ();') at [Teradata_CIONESCU]
2) select 1 from openquery (Teradata_CIONESCU,'call CIONESCU.stp_agg_3 ();')
error: OLE DB provider "MSDASQL" for linked server "Teradata_CIONESCU" returned message "[Teradata][ODBC Teradata Driver][Teradata Database] Invalid session mode for procedure execution. ".
Any ideas?
error while extrating data from ORACLE using TPT ODBC_OPERATOR - response (2) by mayya@teradataforum
Hi,
Please anyone help me in resolving this issue.
Datamart - response (4) by vaibhav7
Hello everyone,
I am very new to teradata can someone tell me exact functionality of ODS and EDW databases..
Thanks in advnace..
How to find out Active sessions at any point of time. - response (6) by Somdebroy
Hello, This is what I do to find active sessions:
SELECT *
FROM TABLE(MonitorSession(-1, '*', 0)) AS T2;
Need help!! Extracting year from table Name - response (3) by DS
sel regexp_replace ('tablename_1203','([a-z]+[_])','');
Null accepted in column defined as Not null - forum topic by Glass
When I actually get the HEXINT value for that record on that column, it was returning ‘00000000000000000000’. Now actually we were able to get the hex character loaded in that particular column and it is “x’00’”. This Hex null is somehow loaded into Teradata table through datastage jobs.
DDL:
VND_AP_NUM CHAR(12) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
SEL vnd_ap_num FROM vendor.vnd
WHERE
vnd_num = 1548 and vnd_ap_num is null;
Result 0
sel chars(trim(vnd_ap_num)) from vendor.vnd where vnd_num = 1548;
Result 12
SEL chars(trim(oreplace(vnd_ap_num,null,''))) FROM vendor.vnd
WHERE
vnd_num = 1548;
Result 0
Why would multiple null be accepted in a Not null column?
Rglass
But when I run a select query directly on the view, with my user id, the timestamp of the table also get updated