SQLIS Wiki
User: Guest
Login
Wiki Home Wiki Home
Topic Index Topic Index
Edit Edit
Print View Print View
What's New What's New
Search
RSS 2.0 RSS 2.0
Recent Topics
ExecuteSQL ExecuteSQL
WhereDoIFindThePa... WhereDoIFindThePa...
RuntimeErrorCodes RuntimeErrorCodes
0xC004703F 0xC004703F
0xC004801F 0xC004801F
0xC0202022 0xC0202022
0xC0047030 0xC0047030
0xC001404D 0xC001404D
0xC0047071 0xC0047071
0xC0047019 0xC0047019

Current Version:
3/28/2006 6:11 AM DarrenSQLIS
Execute SQL
.

The Execute SQL task in SSIS is massively more powerful and flexible that its DTS predecessor. You can see a full rundown on a lot of its new capabilities here

The Execute SQL task

One of the things we did leave off that article is outputting a resultset to XML. If you have used the task to output your results to XML and possibly reused them using the XML Task or the XML Source Adapter then why not edit this wiki and tell us about it? I am sure we would all find it informative.

Parameters vs Expressions

When you need to pass values into the ExecuteSQLTask you have two choices, you can use the built in parameter support, or you can use a property expression on the SQLCommand property. They both have benefits so to help you decide here is a quick list-

Expressions

    • More flexible in that they can parameterise anything, this is just string concatenation. No limitations on what and where the replacement goes, so can parameterise table names.

Parameters

    • Not a SQL injection risk as with string concatenation of expressions.
    • Not limited to overall length of 4000 characters, the maximum length of an expression, which will include data values.

Parameters need to be typed. OLE-DB Parameter type from a variable of type DateTime going to a column of type datetime should use the DATE type, not DB_TIMESTAMP as you are probably used to from the SSIS column types.

Copyright © 2001-2005 SQLDTS.com. All Rights Reserved. TermsOfUse, Powered by FlexWiki 1.8.0.1677