on 05-28-2015 9:17 AM
Hi,
I have written a test procedure using development perspective. (I think only procedures created via development perspective can be debugged, kindly correct if I am wrong).
Procedure is as below -
PROCEDURE "A"."A::get_product_sales_price_st"
(IN productid NVARCHAR(10),
OUT out_tt table (prodid nvarchar(10), price decimal(15,2))
)
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
--DEFAULT SCHEMA
<default_schema_name>
READS SQL DATA AS
BEGIN
/*****************************
Write
your procedure logic
*****************************/
declare v_l1 nvarchar(2) := :productid;
out_tt = select :v_l1 as prodid, 1.5 as price from dummy;
END;
When I call this procedure in SQL console, I can see the output.
call "A"."A::get_product_sales_price_st"('A',?)
But when I debug procedure in debug perspective, it shows me values of input parameters, but NOT of Output.
Any idea, why debugger not showing value of out_tt and why it is terminating at the end?
Thanks for the reply.
Best Regards,
Saurabh
Hi,
Any answer to question? Why output values are not being displayed in debugger?
Regards,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And is it failing at first select statement only?
Ok please do on thing. create one table type first as below : Its a sample table type.
CREATE TYPE SCHEMA_NAME.OUT_TT1 AS TABLE (
prodid nvarchar(10),
price decimal(15,2)
);
then in your procedure do as below and then debug.
create PROCEDURE get_product420
(IN productid NVARCHAR(10),
OUT out_tt "HANA"."OUT_TT1")
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
READS SQL DATA AS
BEGIN
declare v_l1 nvarchar(2) := :productid;
out_tt = select :v_l1 as prodid, 1.5 as price from dummy;
out_tt = select :v_l1 as prodid, 1.5 as price from dummy;
END;
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.