Hi All
Need some advise on how to use system configurations to dele data from table using SQL scripts.
I have created two different schema on the SQL database “dbo”, and “env”. We have the same table on both schema called “EMPLOYEE_GENERAL”. In BODS I have created two different datastore connections with Alias, to point to different schema, and created two different system configuration, and assigned different data store configurations.
If I create a dataflow, with drop and recreate as the target table, I can run the job with different Sys Config, and the data get deleted, and created as per the requirement.
I have removed the “Drop and Recreate” option, and added a truncate statement to delete the data. Without the actual schame name, the script created as below
SQL (‘DS_STG_OBJ_INIT’,'Delete from EMPLOYEE_GENERAL)
If I run the job, with any Sys Config, it deletes the data from “dbo” schema. I can change the script and confditionally use it with the schema name, which works.
SQL (‘DS_STG_OBJ_INIT’,'Delete from dbo.EMPLOYEE_GENERAL)
SQL (‘DS_STG_OBJ_INIT’,'Delete from enr.EMPLOYEE_GENERAL)
Any idea, how I can use the ALIAS name, instead of the scheme name, so I don’;t need to maintain and update this script with further schemas…
amuh10 (BOB member since 2012-04-11)