Hello Masters,
i am trying to create a sql procedure and perform some operations. the procedure builds perfectly in my own schema but when i try to create it in another schema it throws me the error
"
SAP DBTech JDBC: [2862] (at 2845): SqlScript: Could not derive table type for variable "VAR_SINGLE_MDB_GUID_DATA" (SQL error: insufficient privilege): line 89 col 1 (at pos 2845)
"
i might not have permission to create a procedure i understand but in that case i should get the error "insufficient privilages" only... can anyone help me explain why i am getting error on VAR_SINGLE_MDB_GUID_DATA . Below is work on VAR_SINGLE_MDB_GUID_DATA
VAR_SINGLE_MDB_GUID_DATA =
SELECT MDB_GUID,SOURCE,CLIENT,NAME_FIRST,NAME_LAST,EMAIL,CONTACT,CHDAT,CHTIM,XDELE FROM (
MDB_GUID AS MDB_GUID,
AS SOURCE,
AS CLIENT,
AS NAME_FIRST,
AS NAME_LAST,
AS EMAIL,
AS CONTACT,
AS CHDAT,
AS CHTIM,
AS XDELE,
COUNT(*) OVER (PARTITIONBY MDB_GUID)AS CNT
FROM c5210998.BR_CON_TEST_MDB_GUIDS_3 -- "SAPMCX".ZMD_DB_CON_EXT
WHERE MDB_GUID != '00000000000000000000000000000000'
AND SOURCE IN (SELECT SOURCE FROM SAPMCX.ZMC_DB_PRIORITY)
AND MDB_GUID ISNOTNULL )
WHERE CNT =1;
post to above i have used the VAR_SINGLE_MDB_GUID_DATA directly in var_out with a union clause. i can work out with LTT easily but want to understand why this error comes only when i build the procedure in another schema than mine.
thanks for help in advance.
pawan