Quantcast
Channel: Teradata Forums - Database
Browsing all 14773 articles
Browse latest View live

Sequnce generated column in Volatile table - forum topic by bala2121

Hi All,  I need to have a unique column as row_id in a volatile table, with values to be populated based on the order of Insertion happened. I cannot have it based on the timestamp of insert, since...

View Article


How to create records from a defined range - response (9) by dnoeth

Simply use two Derived Tables producing the required numbers and then cross join them.  Dieter

View Article


Implicit conversion of Integer to VARCHAR - response (3) by dnoeth

Hi Nishant,"group_amps" during an all-AMPs step usually means the optimizer assumes that less than 50% of the AMPs in the system will actually do some work, but the actual AMPs are not known before the...

View Article

qualify rank() over (partition) - question - response (5) by dnoeth

Did you try the query i posted, this should work as expected. But performnace on a 5 billion rows table will be probably poor when you actually need all those 100 columns (all data will be put in spool...

View Article

Update statement with left outer join in from clause. - forum topic by...

Hi, Please guide on how to write left outer join inside update statement in Teradata. Below is one of sql that we need to run on Teradata.   UPDATE Staging.CDD_Today SET ABC_Risk = b.riskfactor  FROM...

View Article


Space consumed by Primary Index - response (5) by VBurmist

Nishant,  yes, proportional increase in size is a logical way to go.   You can check it yourself by creating a table in DEV with 1000 records only, then 10000 records.   Check the size of the index in...

View Article

Updating a table through view - response (4) by mayya@teradataforum

Thank you Dieter. Will mark your words and check it accordingly. Regards, Mahesh

View Article

Collecting statistics - forum topic by mayya@teradataforum

Hi, In my query, I am using set operator(minus) between two tables say A & B. Select ...... 33 columns..... from A minus select ...... 33 columns..... from B To enhance the performance of the...

View Article


Session Blocked by another idle session - response (1) by VBurmist

Hi, One possible scenario is when a session has an unfinished transaction.    This is when a user has issued a  BEGIN TRANSACTION is Teradata transaction mode, or is working in ANSI transaction mode....

View Article


Query to return the difference of dates between records - response (1) by...

Hi,  you can use MAX(status_date) OVER (PARTITION BY policy_no ORDER BY status_date ROWS BETWEEN PRECEDING 1 and PRECEDING 1)   or something similar to get the "previous" date for the dates you...

View Article

Update statement with left outer join in from clause. - response (1) by dnoeth

Hi Harpreet, is this an actually update statement? (SQL Server?) There's no condition to join to CDD_Today.  You might rewrite it: use a Correlated Subquery UPDATE Staging.CDD_Today SET ABC_Risk =  (...

View Article

Find position of a character in a string - response (2) by dnoeth

What's your TD release? In TD14 there's INSTR to find the nth occurence of a string or better STRTOK to extract the nth token from a delimited string. Previously you might check if INSTR (or a similar...

View Article

Collecting statistics - response (1) by dnoeth

Hi Mahesh, no statistics will change the plan for this query, so you don't need any statistic at all. When performance is bad it might be due large spool usage. You might try MINUS ALL instead (if...

View Article


Teradata SQL? - response (1) by dnoeth

Of course: SELECT MONTH_BGN_DATE FROM MONTHDAY_DIM WHERE MONTHDAY_KEY = ADD_MONTHS(DATE , -4) OR MONTHDAY_KEY = ADD_MONTHS(DATE , -3) If these are your actual queries, the 2nd closing parens...

View Article

MR and MS access rights - response (1) by dnoeth

They are used to control who can use the PM/API commands MONITOR SESSION/RESOURCE. Check the "Application Programming Reference" manual for details.  Dieter

View Article


How to get columns in collect stats - response (1) by dnoeth

Depends on your release: For TD14 you get it from dbc.StatsV, before it's in various dbc views (column/index/multicolumn-StatsV) or better try my stats query to get more details:...

View Article

Sequnce generated column in Volatile table - response (1) by dnoeth

Hi Bala, are those inserts single row or insert/selects?  Dieter

View Article


SQL Assistant inserts double quotes - response (1) by dnoeth

Hi Nolan, i don't think that SQLA will add quotes, this is probably done by Excel itself. Similar when i cut&paste from SQLA to Excel, in some cases it's double quoting the query.  Dieter

View Article

Collecting statistics - response (2) by mayya@teradataforum

Thank you so much Dieter. Will implement according to your inputs.. :)

View Article

Counting Records Through Multiple Date Ranges - forum topic by bdburch1

I am pretty new to teradata and know some basic SQL but I find that I am struggling with this problem.  I need to count the number of records for total sales and cash sales according to what quarter...

View Article
Browsing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>