It is possible to dynamically generate complete programs and execute them using the scriptexec statement. The following example imports the Orders table from the Northwind odbc data source. The generated code, should be in the tiImport language syntax.
DATASOURCE a1 = odbc ‘dsn=northwind’
DECLARE @tableName as string
SET @tableName = ‘Orders’
ScriptExec 'import [' + @tableName + '] = a1.[ ' + @tableName + '] '
Please sign in to leave a comment.