SAS connect Teradata and execute

Database

SAS connect Teradata and execute

Hi all.

I tryng execute on teradata a Insert procedure from SAS, but i receive a strange error .

I need execute:

proc sql;

connect to teradata as tera (user=xxxxx password=xxxxx database='ZZZ' tdpid='db1xxxxh.xxx.xxxxx.xxx' );

execute (

    INSERT INTO D_REL_PDD_V.VW_RTDM_SOLICITACAO

            (OID_RTDM_SOLICITACAO, NOM_FLUXO, NOM_TIPO, NOM_SUBTIPO, COD_AGENCIA)

    SELECT

            OID_RTDM_SOLICITACAO

            NOM_FLUXO,

            NOM_TIPO,

            NOM_SUBTIPO,

            COD_AGENCIA

    FROM

            WORK.TESTE_TERA)

by tera;

execute (commit) by tera;

disconnect from tera;

quit;

This is a error:

ERROR: Teradata execute: Syntax error, expected something like a name or a Unicode delimited identifier or an 'UDFCALLNAME' keyword

       or '(' between the 'FROM' keyword and the 'WORK' keyword.

======================================================

Any ideas?

tks a lot!!!

3 REPLIES
Teradata Employee

Re: SAS connect Teradata and execute

WORK is a reserved word. If the Teradata database name is WORK, you need to quote it: "WORK".TESTE_TERA

If WORK is some SAS object, you can't refer to it in a pass-through EXECUTE.

Re: SAS connect Teradata and execute

Hi Fred.

Tks for your help.

I used to quoted "Work", but not run.

Tks a lot!

Junior Supporter

Re: SAS connect Teradata and execute

Hi.

There is a comma missing after SELECT OID_RTDM_SOLICITACAO

HTH.

Cheers.

Carlos.