After checking in Table Exist

After checking table exists in database, how to create table by the name of parameter value?

In AutomationEdge Process Studio, you can dynamically create a table only if it does not already exist by using the following steps:

  1. Check Table Existence: Use the Table exists step to check whether the specified table exists. Configure the database connection, table name, and a result field (e.g., table_exists_flag).

  2. Filter the Result: Connect to Filter rows and set the condition table_exists_flag = False. Route the True output (table does not exist) to the next step.

  3. Create the Table: Use Execute SQL script to execute the CREATE TABL` statement with the table name parameter.

    CREATE TABLE ${TABLE_NAME_PARAM} (
    id INT PRIMARY KEY,
    column_name VARCHAR(100)
    );

    Important: Enable Variable substitution (or Replace variables in script?) so the parameter is replaced with its runtime value before the SQL executes.

This ensures the table is created only when it does not already exist.