0 - 11 of 11 tags for procedure

Does CREATE MACRO have an equivalent of CREATE PROCEDURE's SQL SECURITY clause? Or should the database of the user executing the macro always always have SELECT/UPDATE access, as needed, to the tables used in the MACRO?

Hi,
I have a stored procedure which is checking counts from four tables. I need to raise exception if the counts are not matich with a predefined value. Can anyone help me on how to achieve this? I am using Terdata 14 version.

I am trying to create a table and populate it inside a stored procedure but I get E(3807): table does not exist.
I used the following query:
 create procedure stp_agg (in par1 varchar (20),in par2 int)
begin
    create table tbl_spt
    as
    (select subscriber_id from existing_tbl) with no data;

Team,
Could you please help in writing a stored proc for the below requirement.
I need to add integer to a data column by excluding weekends & custom holidays.
Example :- OE_Date ( Date ) + Days ( Integer ) = Calculated_Date Column ( Date )

When I call the procedure below in SQL Assistant, the data is returned ok, but without column headers...  Is there any way to include the column headers (e.g., in this case, 'DatabaseName','TableName',etc)?
 
replace PROCEDURE abc()
dynamic result sets 1
begin
     DECLARE SqlStr VARCHAR(100);

Hi,
ROW_COUNT is returning wrong number.
i have a table having around 100K rows. In a procedure i'm updating all the rows and returning number of rows affected.
I'm using following query to get number of affected rows.
 
GET DIAGNOSTICS v_Variable_Name = ROW_COUNT;
 

Is there any way to find whether the procedure is valid, without recompiling it?
I came across a Proc, which i tried to Recompile, it just fails with missing column on one of the underlying table.
I dont want to recompile all procs, just to find whether they are valid are not. 

Hi,
I'm new to TeraData. Following is the script i am using to create to While loop in Stored Procedure.
But TeraData Studio is giving me Syntax Error:
can we use loop in Stored Procedure or is there any other way to do that.
Kindly suggest.
CREATE PROCEDURE proc (
        IN i INTEGER,

Hi, All
I have a main procedure which is used to invoke other sub-procedures. I've added the 'DECLARE EXIT HANDLER FOR SQLEXCEPTION' in the main procedure. But when any exception raised in sub-procedure, the HANDLER in main procedure doesn't work. So how can I catch exceptions generated in all sup-procedures?

Hi,
 
I am trying to pass a result set of a query into a procedure. I  only need one column from a table but the column will have multiple rows.
I have tried within the procedure to have : SELECT columnname INTO :variable from dbc.tablename where columnname2 = 'value';

I am trying to call Stored Procedure with parameters. Procedure have two TIMESTAMP parameters for example use below one: