All Forums Database
Raja_KT 1246 posts Joined 07/09
07 Aug 2009
PPI code

Hi,Can anyone please paste script of teradata PPI script here? Somehow I could not find it in my docs...Thanks in advance....Raja

Raja K Thaw

My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1

Street Children suffer not by their fault. We can help them if we want.

pawan0608 101 posts Joined 12/07
07 Aug 2009

Are u looking for something like thisCREATE SET TABLE Employee(Employee_Number INTEGER NOT NULL,Location_Number INTEGER,Dept_Number INTEGER… )PRIMARY INDEX (Employee_Number)PARTITION BY Location_Number ;

Raja_KT 1246 posts Joined 07/09
07 Aug 2009

The complete ..one say... create set table tt(.....)PARTITION BY RANGE_(.....Here the codes.....till the end.....);

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

pawan0608 101 posts Joined 12/07
07 Aug 2009

Below are some more examples from TD DocCREATE TABLE Sales( store_id INTEGER NOT NULL,item_id INTEGER NOT NULL,sales_date DATE FORMAT 'YYYY-MM-DD',total_revenue DECIMAL(9,2),total_sold INTEGER,note VARCHAR(256))UNIQUE PRIMARY INDEX (store_id ,item_id ,sales_date)PARTITION BY RANGE_N (sales_dateBETWEEN DATE '2003-01-01' AND DATE '2003-12-31'EACH INTERVAL '1' DAY );CREATE TABLE Sales_History_ByWeek( store_id INTEGER NOT NULL,item_id INTEGER NOT NULL,sales_date DATE FORMAT 'YYYY-MM-DD',total_revenue DECIMAL(9,2),total_sold INTEGER,note VARCHAR(256))UNIQUE PRIMARY INDEX (store_id, item_id, sales_date)PARTITION BY RANGE_N (sales_dateBETWEEN DATE '2000-01-01' AND DATE '2000-12-31'EACH INTERVAL '7' DAY,DATE '2001-01-01' AND DATE '2001-12-31'EACH INTERVAL '7' DAY,DATE '2002-01-01' AND DATE '2002-12-31'EACH INTERVAL '7' DAY);CASE_N--------CREATE TABLE Sales_Revenue( store_id INTEGER NOT NULL,item_id INTEGER NOT NULL,sales_date DATE FORMAT 'YYYY-MM-DD',total_revenue DECIMAL(9,2),total_sold INTEGER,note VARCHAR(256))PRIMARY INDEX (store_id, item_id, sales_date)PARTITION BY CASE_N( total_revenue < 2000 , total_revenue < 4000 ,total_revenue < 6000 , total_revenue < 8000 ,total_revenue < 10000 , total_revenue < 20000 ,total_revenue < 50000 , total_revenue < 100000 ,NO CASE,UNKNOWN);

Raja_KT 1246 posts Joined 07/09
07 Aug 2009

Thanks a lot......Raja K

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.