on 07-02-2013 8:59 AM
Hi
Trying to create a sample procedure !!!!!!!!!! Results in the error...
Below is the screen shot for your reference.
Resulted in the error as : SAP DBTech JDBC: [1310] (at 163): scalar type is not allowed: PB_T1: line 4 col 7 (at pos 163)
Can any one let me know how to customize the coding and populate the data??
Best
Sanjay
Hi Sanjay,
Try like this:
drop type "SANJAYM"."PB_T1";
create type "SANJAYM"."PB_T1" AS TABLE (PROD_ID INT, BRAND_NAME NVARCHAR (30));
drop procedure "SANJAYM"."SAMPLE";
create procedure "SANJAYM"."SAMPLE" (IN PROD_ID INTEGER, IN BRAND_NAME VARCHAR, OUT OUT1 "SANJAYM"."PB_T1")
LANGUAGE SQLSCRIPT READS SQL DATA AS
BEGIN
OUT1 = SELECT PROD_ID , BRAND_NAME FROM "SANJAYM"."PRODUCT" GROUP BY PROD_ID;
END;
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mohan,
your var_out is Varchar type so it cannot hold the two cloumns product & Brand.
You should use TABLE TYPE HERE.
CREATE TYPE I_TEMP AS TABLE
{
PRODUCT(10) INTERGER,
BRAND(10) VARCHAR
}
OUT pt_t1 I_TEMP should be in your var_out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.