None Result Set

In this section we'll describe how to run a batch of SQL statements in a Execute SQL Task with None setting of Result Set.

  1. Open the package ExecuteSQLTask.dtsx in the project LearnSSIS1 if it is closed.

  2. Disable the container 2, 3, 4 by setting the Disable property of each container to True and leave only the Container 1 enabled (Disable property is set to False).
  3. SSIS Sequence Container Enabled

  4. Right click "None Result" task and choose "Edit..." to open Execute SQL Task Editor and select General tab (Default).

  5. Set ConnectionType as "OLE DB" and localhost.Test as the Connection, then click SQLStatement field and click "..." button at the end of the field to open Enter SQL Query window, copy the following code and paste here.

  6. CREATE TABLE student(
    	[id] [int] IDENTITY(1,1) NOT NULL,
    	[name] [varchar](50) NOT NULL,
    	[age] [int] NULL,
    INSERT INTO student ( name, age ) VALUES  ( 'Mike', 18 )
    INSERT INTO student ( name, age ) VALUES  ( 'Steve', 19 )
    INSERT INTO student ( name, age ) VALUES  ( 'Rob', 20 )

    SSIS Enter SQL Query

    The SQL statements is to create a student table and insert 3 records in it.

  7. Click "OK" button to close the window. After the above setting, the Execute SQL Task Editor looks like below.
  8. Execute SQL Task Editor None Result Setting

    Because the ResultSet is set None which means there is no result Set, The Result Set tag is not needed to be set.

  9. Click "OK" again to close the Editor. Then run the package.
  10. After running, you will get the result below.

    None Result Container Runs Result

For the other fields in the Execute SQL Task Editor General page, we'll demonstrate them in a table as below.

FieldDescriptionDefault Value
TimeoutThe maximum number of seconds before the task runs timeout0 (means infinite time)
CodePageThe code page to use when translating Unicode values in variables1252 (code page of the local machine)
TypeConversionModeAllowed means converting output parameter and query results to the data type of the variables you setAllowed
QueryIsStoredProcedureWhether the SQL is set as a stored procedure and can be set in ADO connection onlyFalse
BypassPrepareWhether the SQL statement is prepared and it's available only with OLE DB connectionTrue

In the next section, we'll handle the situation if the result set returns a single row.