Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
20Activity
0 of .
Results for:
No results containing your search query
P. 1
Teradata Advanced SQL - Day4 Part1

Teradata Advanced SQL - Day4 Part1

Ratings: (0)|Views: 8,738|Likes:
Published by satish

More info:

Published by: satish on Aug 09, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/09/2013

pdf

text

original

 
1
Advanced Teradata SQL
GLOBAL Temporary Vs VOLATILE Temporary VsDerived tables
WITH and WITH BY
Special Index function
Trigger
Online Analytical Function
Ordered Analytical function
 
2
Global and Volatile Temporary Tables
Temporary tables are an additional tool that assist us in performingSQL operations that either:Might not be possible against a normalized table, orMay require multiple SQL statements to complete.There are three types of temporary tables implemented in Teradata:GlobalVolatileDerived
 
3
Derived Tables
Some characteristics of a derived table include:Local to the query -it exists for the duration of the query.When the query is done the table is discarded.Incorporated into SQL query syntax.Spool rows are also discarded when query finishes.There is no data dictionary involvement -less system overhead.
Example
SELECT t.prodid,t.sumsales,RANK(t.sumsales)FROM (SELECT prodid,SUM(sales)FROM salestblGROUP BY 1) AS t(prodid, sumsales)QUALIFY RANK(sumsales)<=3;

Activity (20)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
seenuguddu liked this
Murali Krishna liked this
Amit Bhartiya liked this
qbeg_ liked this
myname_123 liked this
gsubbu143 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->