简体   繁体   English

从 SAS 执行 teradata 存储过程

[英]Executing teradata stored procedure from SAS

I'm trying to execute Teradata stored procedure from SAS,but am failed to find the correct syntax, here is example of what i tried:我正在尝试从 SAS 执行 Teradata 存储过程,但找不到正确的语法,这是我尝试过的示例:

libname tbconn teradata server="10.11.18.15" database="yy" user=x pw=xx; libname tbconn teradata server="10.11.18.15" database="yy" user=x pw=xx; execute tbconn.ProcedureName(date '2011-03-31');执行 tbconn.ProcedureName(date '2011-03-31');

and i also tried to use call command instead of excecute but it didnt work also.而且我也尝试使用调用命令而不是执行,但它也不起作用。 any idea people.任何想法的人。

Have you tried the following:您是否尝试过以下方法:

libname tbconn teradata server="10.11.18.15" database="yy" user=x pw=xx; call <databaseowner>.ProcedureName(date '2011-03-31');

Where <databaseowner> is the database where the stored procedure is located on Teradata.其中<databaseowner>是存储过程在 Teradata 上所在的数据库。 I'm not sure if database="yy" in your example is the same database where the stored procedure can be found or not.我不确定您的示例中的database="yy"是否与可以找到存储过程的数据库相同。

Edit: Does SQL that is passed-through to the database need to be wrapped in something like an EXECUTE function on SAS?编辑:传递到数据库的 SQL 是否需要包装在 SAS 上的 EXECUTE function 中? EXECUTE(call <db>.<procedure>(<param>);) BY tbconn;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM