Showing posts with label Returning resultset from a stored procedure. Show all posts
Showing posts with label Returning resultset from a stored procedure. Show all posts

Tuesday, October 23, 2012

Difference between Teradata V12 and Teradata V2R5

Stored Procedure Enhancements
Multilevel Partitioning introduced
Supports SQL invocation from external stored procedures
Returning multiple resultsets from a stored procedure
Supports DSW(Destination Selection Word) of 20 bits also
BLOB and CLOB extended till to 10 GB
V2R5 - 512 nodes, TD12 - 1024 nodes


Multilevel Partitioning


create set table test1
(
empid integer,
empname varchar(30),
sdate date
)
PRIMARY INDEX(empid)
partition by
(
Range_N(empid between 1 and 10,sdate between DATE '2010-01-01' and DATE '2010-01-01')
Case_N(empid=10,empid=5,NOCASE,UNKNOWN)
)


Returning resultset from a stored procedure


CREATE PROCEDURE "SCHEMA"."GETRESULTSET" (
    IN "p1" VARCHAR(30))
DYNAMIC RESULT SETS 1
BEGIN    
DECLARE cur1 CURSOR WITH RETURN ONLY TO CLIENT FOR
 SELECT "Partition" FROM "SCHEMA".SessionInfo where username = p1;  
  OPEN cur1;  
END;