Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 05 Dec 2003 @ 14:09:30 GMT


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


Subj:   Help me in executing this
 
From:   Binoy Mathunni

Hai

Help me in executing this procedure.

CREATE PROCEDURE user.test
( In str1  varchar(15), In str2  varchar(15), In num1  integer, In num2
integer, Out num3  integer)
BEGIN
Declare  a integer;
Declare  b integer;
Declare  c integer;
Set a =index(str1,str2);
Set b =index(substr(str1,a+1),str2 )+a;
Set c =index(substr(str1,b+1),str2)+b;

                Case
                        When    num2=1 Then num3=a
                        When    num2=2 Then num3=b
                        When    num2=3 Then num3=c
                        ELSE     num3=0

                END case;

        END;


     
  <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