"EXECUTE_SQL" Command
Description: This command executes a statement using a query or several statements using a file without returning any value.
Usage Scenario: Suppose we want to create a new table named "users" in our PostgreSQL database.
Procedure: Define a query that creates a table using values from variables such as below:
CREATE TABLE @table_name (
@field1 integer NOT NULL,
@field2 text NOT NULL,
@field3 text,
@field4 text,
@field5 text,
@field6 boolean
);
Define your variables in your steps which will be: @table_name, @id, @username, @firstname, @lastname, @email', @enabled. Once finished, define a step with Execute_SQL as a command and select the query you added in Subject7 as well as your DB Connection (You will need to edit the DB Connection to include your own database parameters: Username/Hostname/Vendor, etc). Your steps will look like this:
Â
Â