Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 25 Jan 2006 @ 11:28:24 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Procedures in Terradata..
 
From:   Wadhwa, Vivek

All,

Can anybdy help me regarding making a procedure in TERRADATA,BTEQ enviornment.

The code is as below for procedure.

     CREATE PROCEDURE test_value
       (IN p1 INTEGER, OUT pmsg CHAR(30))
     BEGIN
       IF p1 > 0 THEN
         SET pmsg = 'Positive value';
       ELSEIF p1 = 0 THEN
         SET pmsg = 'Zero Value';
       ELSE
         SET pmsg = 'Negative Value';
       END IF;
     END;

As I run this code directly it show error in BTEQ & I also I tried to copy the code in sql file and tried to run it

In BTEQ by .run file=filename. Still it showed error.

Can anybdy help me out to create a procedure in TERRADATA BTEQ enviornment.


TQ in Advance.

Vivek Wadhwa



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023