|
Archives of the TeradataForumMessage Posted: Thu, 20 Jan 2011 @ 09:10:46 GMT
We are trying to make dynamic SQL in our DATABASE DIM_VSE_DESA. For that, first we create our procedure to execute de dynamic SQL: REPLACE PROCEDURE DIM_VSE_DESA.SQL_DINAMICA(IN Cadena VARCHAR(8000)) BEGIN CALL DBC.SysExecSQL(:Cadena); END; Then we are able to execute this: CALL DIM_VSE_DESA.SQL_Dinamica ('DROP TABLE DIM_VSE_DESA.FIN_BORRAR') ; But, when we try to create the table.... CALL DIM_VSE_DESA.SQL_Dinamica ('CREATE TABLE DIM_VSE_DESA.FIN_BORRAR AS (SELECT 1 COLUMNA) WITH DATA ') ; It doesn't work due to rights: An owner referenced by user does not have CREATE TABLE WITH GRANT OPTION access to database DIM_VSE_DESA. Our accesses rights: DBC has SELECT, CREATE and DROP access to DIM_VSE_DESA. DIM_VSE_DESA has SELECT access to some views in DBC. Is there any right missing here to get the dynamic SQL working? Thanks for any help.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||