Teradata Studios Default Time Display - response (2) by tomnolan
Find table size and last access date - response (8) by ToddAWalter
If an object existed prior to turning on usecount, and it has not been accessed since usecount was turned on, then the last access will still be null.
How to block all client connections to teradata database from a particular server/IP - forum topic by Tdarc1
Hello,,, we need restrict all client connection connecting from a perticular IP address/server to Teradata Database . Is there a way I can enable it in TASM ?
Teradata 14 basics certification information - response (20) by madhavikaduru
Kindly help me in obtaining relavent materials to pass TE0-143.
Your quick response appreciated.
Thanks,
Teradata 14 basics certification information - response (21) by VandeBergB
You can download ALL of the relevant documentation at teradata.com.
Tactical Queries - forum topic by spbalu
I am having trouble meeting the SLA of tactical queries. We are using applicance 2750 , 2 Node system with 120 AMPs. We have an MQ Series Integrator that sends stored procedure calls to the database. Each Stored Procedure generates approximately 100-120 single amp tactical queries (using primary index) these are mostly deletes and inserts (apart from some regex functions on the input parameter values passed). Typically we receive around 20,000 messages on a daily basis - around 2000 per hour during the business hours. We are not able to process all these requests on daily basis and queue builds up and gets emptied only during saturdays when the call volume is low.
I implemented TIWM and assigned all these to tactical workload. BTW, we are using SLES 11. But i dont any improvement at all even after implementing the tactical workload. we are only able to process around 500-800 messages on average per hours (against 2000 received). The average queries (tactical) submitted to database per hour are around 160K transactions. Most of these run under a second (typically 0.02 to 0.9 seconds). I checked resusagespma table and we almost have free cpu available all say (no flow control situation). Some of things that i cant get around my head is that, same query for instance :
and by the way there are only two workloads defined on the system - Default and tactical for MQSI tactical queries.
Delete from A where PI='xyz';
1) The same query takes some times 0.01 seconds and during some other time 0.8 seconds. Thats a plenty of free cpu time ! (atleast 30% cpu free)
2) The numbers of messages processed per hour keeps changing , during night when there is less activity it goes up 1200 messages per hour and comes down to 500 during day when system is relatively busy. But when these are tactical queries why is this affected by other work on the system?
Is there any thing else i can do to process 2000 messages per hour ?
Thanks in advance.
Tactical Queries - response (1) by dnoeth
Did you check if you're I/O bound?
How do you submit those 100-120 single amp tactical queries within the SP, serially or in parallel?
Do the Inserts/Deletes process the same or different tables?
Recursive Query to List down the Lineage for a Particular Table with Immediate Parents - response (1) by dnoeth
Hi Himanshu,
you probably use the wrong column in your recursive part, old.source instead of new.source.
Convert a Field - response (3) by dnoeth
What's your Teradata release?
This works fine for me, but you better use oTranslate instead of oReplace:
SELECT CAST(OTRANSLATE('1 12 ', '', 'x') AS CHAR(12))
oReplace is built-in since TD14, if you're on an older release or got a UDF with the same name this might work differently.
How to block all client connections to teradata database from a particular server/IP - response (1) by dnoeth
Yep, you can specify a client IP-address in the Request Source classification.
Data set manipulation - forum topic by SSMMSS
Hi all
am trying to get solution to the following problem. I have the table below and should add ape. to the the values proceeding Damen.mode and the two proceeding values to ADS.
VisitID Position Text
A 1 Storefront
A 2 basket
A 3 Damen.mode
A 4 PE
B 5 ADS
B 6 PE
B 7 PE
B 8 Storefront
Result should look like this
VisitID Position Text
A 1 Storefront
A 2 basket
A 3 Damen.mode
A 4 ape.Damen.mode
B 5 ADS
B 6 ape.ADS
B 7 ape.ADS
B 8 Storefront
Thank you all.
Recursive SQL with update query - response (1) by dnoeth
WITH can only be used with SELECT (just don't ask why):
Note: You can only use this statement modifier with SELECT statements. WITH cannot be used with other DML statements.
There's a workaround, create a Recursive View and use it instead.
Or materialize the Select in a Volatile Table.
teradata insert to identity column? - response (1) by dnoeth
There's no syntax like that in Teradata, you can only create the Identity using GENERATED AS DEFAULT.
But then you must adjust the MINVALUE to the maximum actual value plus one.
Performance of corelated subquery - response (2) by dnoeth
What kind of Correlated Subqueries?
Scalar within the SELECT list?
Using non-equality conditions?
Data set manipulation - response (1) by dnoeth
You didn't tell the actual logic why it's only for those rows.
Looks like it's replace PE with the previous non-PE value
CASE WHEN text_ = 'PE' THEN 'ape.' || LAST_VALUE(CASE WHEN text_ = 'PE' THEN NULL ELSE text_ END IGNORE NULLS) OVER(--partition by ?? ORDER BY Position_) ELSE text_ END
.COMPILE throws error 7947 in spite of having only one Replace Procedure Statement in BTEQ - response (2) by larun1616
THanks Fred. Finally, I sorted out the issue. The SQL file that I was using was saved using notepad. While saving it was encoded as UTF. I just changed the encoding to ANSI saved it again and tried. It worked. Hope this helps.
Teradata Error: [3704] '' ('0A'X) is not a valid Teradata SQL token. - response (8) by sh_one
Is this behaviour of the 15.10 ODBC driver a known bug?
Tracking Time When Last Accessed - response (4) by Taha
Thanks Dieter :)
Using SQL History tab slows Studio to a crawl - response (13) by sfought
Any update on this issue? Thanks.
Help! WITH RECURSIVE does not return desired result.. - forum topic by ashish.jn.in
Untitled Page
I have a data set in oracle (img1 in attachment)
ww_id
fmly_nm
given_nm
jnj_supvr_ww_id
000000034654
CLARK
LISA
000000033121
000000033121
ULLMANN
MICHAEL
000000086902
000000086902
GORSKY
ALEX
000000086902
below query in oracle
select a.wwid, LEVEL hier_lvl_no, SYS_CONNECT_BY_PATH(UPPER(a.wwidname)
, ' -> ') rptg_hier from (select to_number(a.ww_id) wwid, a.jnj_supvr_wwid_nbr,
to_number(a.ww_id)||' - '||a.fmly_nm||', '||a.given_nm wwidname from jjcomp.jjeds_emp
a ) a start with a.wwid = (86902) connect by nocycle prior a.wwid = to_number(a.jnj_supvr_wwid_nbr)
gives me following result
wwid
hier_lvl_no
rptg_hier
86902
1
-> 86902 - GORSKY, ALEX
33121
2
-> 86902 - GORSKY, ALEX -> 33121 - ULLMANN, MICHAEL
34654
3
-> 86902 - GORSKY, ALEX -> 33121 - ULLMANN, MICHAEL -> 34654 - CLARK, LISA
how i can generate the same result in TeraData
14.10 ?? i was trying some code using WITH RECURSIVE, however not able to see desired
result..
WITH RECURSIVE recursive_list(wwid,jnj_supvr_wwid_nbr, name, LVL) AS (
SELECT to_number(ww_id) wwid, jnj_supvr_wwid_nbr, MIN( to_number(ww_id) ||' - '||
fmly_nm || ', ' || given_nm) (VARCHAR(1000)), 1 FROM hrops_v.jjeds_emp where to_number(ww_id)
in ( 86902,33121,34654) GROUP BY 1 UNION ALL SELECT to_number(ww_id) wwid, jnj_supvr_wwid_nbr,
to_number(ww_id) ||' - '|| fmly_nm ||', ' || given_nm || ',' || name, LVL+1 FROM
hrops_v.jjeds_emp INNER JOIN recursive_list ON wwid = jnj_supvr_wwid_nbr AND to_number(ww_id)
||' - '|| fmly_nm || ', ' || given_nm > name ) SELECT wwid, LVL, name FROM recursive_list
QUALIFY RANK() OVER(PARTITION BY wwid,jnj_supvr_wwid_nbr ORDER BY LVL) = 1 where
wwid in ( 86902,33121,34654)
can any body please help me to produce
desired result shown above from oracle ??
The Teradata Database Reference / "SQL Functions, Operators, Expressions, and Predicates" says the following:
TIME versus CURRENT_TIME
TIME is deprecated. Use the ANSI SQL:2011 compliant CURRENT_TIME function instead.
The issue is that the deprecated TIME function returns a FLOAT value, which needs to be CAST to VARCHAR as Francine noted, in order to obtain a formatted time display.
In contrast, the CURRENT_TIME function returns a SQL TIME value, so the proper time formatting will occur automatically.