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

Teradata query doubt important - response (5) by terdeveloper2012

Hi Dieter, thank you very much...it seems to run..just a question...I have also tried to use a loop creating the procedure :   replace procedure GetQuery ( OUT xToken varchar(2000)) begin declare...

View Article


Teradata query doubt important - response (6) by dnoeth

You should mention the exact error message instead of "doesn't work". When you want a SP to return answer sets you have to define it with "dynamic result sets": replace procedure GetQuery(OUT xToken...

View Article


Obtaining DDL Information From The System Tables - response (1) by dnoeth

It's impossible to create the full syntax out of the system tables: Most of the metadata can be accessed using some dbc views like dbc.columnsV and dbc.IndicesV, but some info is not stored within the...

View Article

Identifying The DDL From The System Tables - response (1) by Adeel Chaudhry

I wrote something in 2008 .... which am attaching here .... hope that helps.   As far as i know, you cannot come up with 100% identical output as that of SHOW TABLE command, but it might just fulfills...

View Article

Teradata query doubt important - response (7) by terdeveloper2012

I think it would be better not use a loop, it takes long time to execute. Do you think using  sys_calendar is the only way? I can' t use a table with numbers in it

View Article


Teradata query doubt important - response (8) by dnoeth

You should try to avoid loops and cursor logic (which is serial) in a parallel database system :-) You can use any table with numbers in it, you could even use a ROW_NUMBER on any table large enough....

View Article

How do I get Dense Ranking instead of Modified competition ranking? -...

i think we can go with DISTINCT, Dervied table and Join concept..   Sel t1.col1, t1.col2, t1.R1 as sales Rank from table as t1 inner join (Sel sales, Rank(sales) as R1 from (sel distinct sales from...

View Article

Accidental Cartesian Join Bug - topic by benjaminpwarren

I've recently noticed that the Teradata parsing engine doesn't pick up on / given an error for 'accidental cartesians' or, to use another term to make it more clear why I think this is a significant...

View Article


Getting a unique value for VARCHAR field. - response (3) by apulava

Hi Dieter, Can you please help me for my problem. We have TAX_ID field in one of our tables and we are trying to mask that value and so mask value should be unique per given TAX_ID. So we are trying to...

View Article


qualify rank() over (partition.....question - response (6) by prawen

what is the replacement of "qualify rank()" which is in the teradata to informix query.?

View Article

Oreplace limitation - topic by teradatauser2

Hi, Does the Oreplace function in teradata has any limitation.    

View Article

SASPlex SQL and Teradata - topic by buTriGirl

I am creating SQL code in the SASPlex environment that has to transfer data from SASPlex to Teradata, run SQL in Teradata, and transfer data back to SASPlex. My original code runs in Teradata with no...

View Article

Determine Average Count by Day of Week - topic by mattie4

How would I compute an AVERAGE for each day of week between a date range i.e. August through September on a Count?   An average for FRI, SAT, SUN etc.  E.g if there are 6 Thursdays in the date range,...

View Article


Help Needed in Query Optimization - topic by mudit0506

Hi All, We are doing migration from Netezza to Teradata and similar changes are done in Business Objects to accomodate Reporting change in database. We used to have a query that used to run in less...

View Article

Accidental Cartesian Join Bug - response (1) by dnoeth

This is a well known artifact, it's usually encoutered when you forget to use an alias name. Teradata was implemented before there was Standard SQL, the initial query language was called (AFAIK) TEQUEL...

View Article


Getting a unique value for VARCHAR field. - response (4) by dnoeth

Hi Ajay, you could use the calculation i posted and cast it to a char. But be aware, the HashRow function is not guaranteed to return unique values, you might need to implement your own UDF. Dieter

View Article

Oreplace limitation - response (1) by ulrich

It has to be executed on Teradata ;-> What kind of limitation do you have in mind?

View Article


How do i write qualify rank() over (partition.....question - topic by prawen

Hi all..   i have the query read more

View Article

Determine Average Count by Day of Week - response (1) by dnoeth

What do you mean by "6 thursdays in the date range", the number of thursdays in the calendar or the number of thursdays with data in your table? #2 is easy using nested aggregates: SELECT AREA_NM_TURF,...

View Article

Determine Average Count by Day of Week - response (2) by ulrich

you need to count the number of days per weekday separatly and join this to your result set. Something like: select d.AREA_NM_TURF, d.DayofWeek, casT(d.CountbyDayofWeek as decimal(15,3)) /...

View Article
Browsing all 14773 articles
Browse latest View live


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