Hi ,
I have a situation where I need to execute a series of "manufactured" SP names in a loop.
This is the scenario:
From my LANDING database I need to ETL a series of tables to the WAREHOUSE database. Each table has its own transformation requirements.
This is what I am trying to achieve:
- Look up the tablenames in a specific sequence from a control table.
- Makeup the SP name from the tablename e.g.: SET SPNAME = 'sp_load'||tablename;
-
CALL SPNAME .... I have tried ...
- CALL(:SPNAME); or (SPNAME)
- EXECUTE IMMEDIATE (:SPNAME); or (SPNAME)
- CALL DBC.SysExecSQL (:SPNAME); or (SPNAME)
Nothing seems to work for me.
Is there a specific way in Teradata to CALL a dynamic SQL statement that consists of an SP name ?...
Any suggestion please !....
Thank you for your time.
Boris.
Followed steps but getting this error on:
Enter Data Source Name: testdsn
Enter UserID: jf3579
Enter Password:
Connecting with SQLConnect(DSN=testdsn,UID=jf3579,PWD=*)...
adhoc: (SQL Diagnostics) STATE=HY000, CODE=0, MSG=[Teradata][ODBC Teradata Driver] Major Status=0x04bd Minor Status=0xe000000f-[terasso]Cannot load TDGSS library.
ODBC connection closed.
This was the output from the install of TeraGSS. It was installed into a custom directory so that is the reason for some of these warnings. However, maybe i"m missing a link or an environmental variable? I put the teragss lib into the 'LD_LIBRARY_PATH', /home/mechid/teradata/teragss/linux-x8664/14.10.00.06/lib.
Preparing... ########################################### [100%]
1:TeraGSS_linux_x64 ########################################### [100%]
: WARNING : Unable to create /opt/teradata/teragss/site/linux-i386 directory
: WARNING : Unable to create /opt/teradata/teragss/site/linux-x8664 directory
: WARNING : Unable to create /opt/teradata/teragss/site directory
: WARNING : Unable to copy TdgssUserConfigFile.xml
WARNING: Error creating symbolic link /opt/teradata/teragss/linux-i386/client
: WARNING : Unable to create /opt/teradata/teragss/site/linux-i386 directory
: WARNING : Unable to create /opt/teradata/teragss/site/linux-x8664 directory
: WARNING : Unable to create /opt/teradata/teragss/site directory
: WARNING : Unable to copy TdgssUserConfigFile.xml
WARNING: Error creating symbolic link /opt/teradata/teragss/linux-x8664/client
/var/tmp/rpm-tmp.13329: line 127: /opt/teradata/teragss/linux-i386/14.10.00.06/version: No such file or directory
/var/tmp/rpm-tmp.13329: line 129: /opt/teradata/teragss/linux-x8664/14.10.00.06/version: No such file or directory
ls: /usr/teragss: No such file or directory
WARNING: Unable to remove directory "/usr/teragss".\n
Older client programs may not work correctly.