All Forums

Share best practices, knowledge, successes and issues in Analytics, and discuss Analytical Applications. You must login to create a new forum topic.

how to fetch rows from a teradata cursor when i am not sure about no of columns Topic by prashanth.bose 1 day ago Normally we do this : DECLARE EmpCur CURSOR FOR SELECT employee_number , department_number FROM employee WHERE employee_number < 1005 ORDER BY 1 ; OPEN EmpCur; SET newcount = ACTIVITY_COUNT; REPEAT FETCH EmpCur INTO emp, dept; INSERT INTO emp_log VALUES (:emp, :dept); SET newcount ...
25 views
0 replies
Dynamic Cursor For Topic by HaRsHaD 11 Nov 2008 [font=Verdana]
Hi,
I am cerating a procedure, for that I need to make a cursor's Select statment dynamic.
e.g.

replace PROCEDURE spSample(in P_TAB varchar(10))
begin
for cploop as cpcursor cursor for
select * from p_tab
do
pr...
44617 views
13 replies, 2 days ago
Order of joined tables Topic by Zbirda 1 week ago Hi ALL, I have a simple question. Is it important the order of joind tables? What's better?: select ... from large_Table lt inner join medium_table mt on... inner join small_table st on... or?: select ... from small_Table st inner join medium_table mt on... ...
168 views
1 reply, 1 week ago
Calendar table calculation Topic by ratu 10 weeks ago Hi All,
I am a newbi to this forum so can someone help me out.

I am trying to get past 6 month/year numbers from a calendar table in TD.

For example I can query the calendar table on the current month and it will give me this….
Yr Mo
2010 01
<...
630 views
1 reply, 3 weeks ago
Convert columns to rows. Topic by adash-7422 5 weeks ago Hi ,

I have a table with data like :

US 110 120 130
UK 50 60 70

I want data to be :

US 110
US 120
US 130
UK 50
UK 60
UK 70

The reason i want to bring all values into a single column is that I can...
609 views
2 replies, 5 weeks ago
Citrix Server Compatibility Topic by DaveBarritt 09 Oct 2008 Will Teradata SQL Assistant v 7.2.0.0_11 work on a Citrix Server Client that uses Win 2003 (64 bit) for an OS?
6035 views
1 reply, 5 weeks ago
Alternate for 'Qualify ' analytical function Topic by praveenjanagam 6 weeks ago Hi All,

Qualify function is not working in my teradata system .I am getting error while executing the following query . It is not recognizing the 'qualify' key word. so is there any alternative to "qualify" so that i can execute the query ?

SELECT
'Total ...
431 views
3 replies, 5 weeks ago
Search Test String for Column Values Topic by ThisIsBob 6 weeks ago I need to search a VARCHAR(256) column for values stored in another table. Any thoughts?

Something like this:

select text_string
from table1
where text_string like any (select empnum from table2)

Note that table2 has something like 4MM rows...
271 views
2 replies, 6 weeks ago
Quartile fn Topic by adash-7422 6 weeks ago Hi,

We have a requirement where we have to show top regions based on quartile calculations. So if for example we have 48 regions, we would display 12th,24th,36th region. The no. of regions an change in future..it can be 200 as well. In that case we need to display 50,100 and so on. C...
260 views
1 reply, 6 weeks ago
Getting the sum without using the columns in group by Topic by adash-7422 6 weeks ago Hi,

We have a requirement where we need to show the total sum as well as sum grouped based on levels :

eg: If there are 3000 orders , 1400 is under level 1 and 1600 under level 2, then data should be like:

Level 1 - 1400
Level 2 - 1600
Total -...
289 views
2 replies, 6 weeks ago
String Search and Replace. Topic by CapsuleCorpJX 16 Oct 2007 Is there an SQL update statement that can scan through the strings of a column, look for a particular word and replace it with another word?

The column has sentences in it, and I want to replace just one word while leaving the rest of the sentence intact.

24400 views
7 replies, 6 weeks ago
Data Mining - Best Practise Topic by STARTER 20 Oct 2009 Hi,

Can you give me pointers to best practise for Data Mining queries on Teradata data?

Thanks in anticipation,

Starter.
1128 views
2 replies, 7 weeks ago
How to identify PPI columns Topic by Superflash 9 weeks ago Hi , Is there a way to identify columns used for partitoning either in PPIs or MLPPIs

select databasename , tablename , columnposition ,columnname from dbc.indices
where indextype ='Q'
order by 1 ,2,3 ;

brings back the PI of the table , not the partiti...
520 views
4 replies, 7 weeks ago
Error Loading Columns Topic by jafetw 8 weeks ago Hi All,

I was trying load columns in Data Explorer. After chosing a table from available tables, I tried to chose column from available columns, but error message pop up saying "Specified cast is not valid".

Anyone has encountered this problem?
Appreciate your shar...
197 views
0 replies
Teradata Material for 4th, 5th and 6th V2R5 Certification Topic by Pooja Arora 16 Nov 2009 Hi All,

I have cleared first 3 certification on Teradata and I am really keen to get some good material for 4th exam onwards.

for exams till 3 certification I was able to find some really good material on net but I am unable to find the same for 4th onwards.

880 views
2 replies, 8 weeks ago
Inserting '?' into a TD table Topic by manjeet 15 Sep 2009 Hi all,

How do i insert the special character '?' into a table.

Thanks
Manjeet
1495 views
3 replies, 13 weeks ago
Transposing Data Topic by tdick 07 Dec 2009 I am looking to create a simple crosstab query which transposes and sums the below input data into summary output data dynamically. In this case there are 3 dates but I do not want to hard-code the dates into the query. I want the query to identify the dates automatically and place output with ...
1755 views
9 replies, 13 weeks ago
Internal Mechanism of Ranking Topic by harimon 02 Dec 2009 Hi
How does Teradata actually does the ranking internally.

Regards
Sreehari
552 views
1 reply, 13 weeks ago
Passing column name as parameter to the prepared statemnt Topic by tutika_shilpa@yahoo.com 24 Nov 2009 [font=Tahoma]Hi ,

I am trying to pass the format like 'DDMMYYYY' as parameter to the prepared statement from Java .


SELECT (created_date(TIMESTAMP, FORMAT ?) (VARCHAR(10))) from tableA

I get the following error .

com.teradata.jdbc.jdbc_4...
942 views
2 replies, 13 weeks ago
How to handle invalid date fromats in teradata Topic by VinodKumar 08 Dec 2009 i have to load data from file to td table ,in file i am getting invalid formats like '333/1/2009' .how to check this
please help on this


Regards
Vinod
442 views
0 replies
query that provides hierarchy Topic by Nolan Madson 10 Nov 2008 Can someone give me a pointer how to write a query that provides a sorted, indented organization hierarchy given a table with child org id and parent org id. Example of sorting below; I tried to show spaces in the indents, but this forum deletes leading spaces or tabs.

Org 1
O...
12251 views
3 replies, 14 weeks ago
Storing multiple values in a column Topic by adash-7422 04 Oct 2009 Hello,

I want to store multiple values in a column so that when i use it in IN clause all values are picked up in it as separate entities..
What I mean from above is that:
Suppose I have a table T1 with column C1, the data should be present as:
Record_Type C1
2082 views
6 replies, 15 weeks ago
How to calculate 90th percentile in Teradata Topic by Navnit 07 Oct 2009 Seems no build in available in tera data to calculate 90th or nth percentile for the given dataset
unlike ORACLE
1549 views
2 replies, 16 weeks ago
week issues Topic by mad_about_coffee 04 Nov 2009 Hello,







I hope someone could help me with my task:







Weekends = Fri, Sat, Sun



Weekend days = 6, 7, 1







What I ...
947 views
2 replies, 16 weeks ago
Requirements Gathering Topic by meta 16 Nov 2009 Hi

Iam new to Teradata..can any one tell me the process of Requirements Gathering in Teradata warehousing



thanks
725 views
1 reply, 17 weeks ago
You must login to create a new forum topic.