Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Stroed Procedure:Executing succesfully without errors while calling but the output is not being affected - forum topic by bikky6

$
0
0

Hi,
 I have a stored procedure to drop the join indexes when databasename and indexname are passed as parameters.
REPLACE  PROCEDURE db1.DROP_JI( IN databasename VARCHAR(130), IN jiname VARCHAR(130))
BEGIN
DECLARE db_name varchar(130);
DECLARE ji_name varchar(130);
         SET db_name = TRIM(databasename);
         SET ji_name = TRIM(jiname);
         IF EXISTS(SELECT 1 FROM dbc.tablesize WHERE databasename = db_name AND tablename = ji_name) THEN
         CALL DBC.SysExecSQL('DROP JOIN INDEX  ' || db_name ||'.'|| ji_name);
         END IF;
END;
 
CALL db1.DROP_JI('DB1','INDEXNAME');
Showing as 0 rows processed.But the index is not getting dropped.I have checked the privileges and modes.everything is fine.What might be the reason.
help procedure DB1.DROP_JI  attributes
 Transaction Semantics Print Mode Platform Character Set Default Character DataType Collation SPL Text Version Number Default Database Warning Option
1 ANSI N LINUX ASCII LATIN ASCII Y 08 DB Y
 
 

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>