Friday, March 23, 2012
how to determine how many milliseconds a segment of code takes to execute in TSQL on sql s
TSQL on sql server 2005?Answered in .programming.
"DR" <softwareengineer98037@.yahoo.com> wrote in message
news:edSXlrAHIHA.5544@.TK2MSFTNGP02.phx.gbl...
> how to determine how many milliseconds a segment of code takes to execute
> in TSQL on sql server 2005?
>|||You have been asked not to do this before so Please don't post independently
in separate newsgroups. You can add multiple newsgroups to the header and
then all the answers appear as one. See my reply in the other newsgroup.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"DR" <softwareengineer98037@.yahoo.com> wrote in message
news:edSXlrAHIHA.5544@.TK2MSFTNGP02.phx.gbl...
> how to determine how many milliseconds a segment of code takes to execute
> in TSQL on sql server 2005?
>
Sunday, February 19, 2012
How to define a user variable on Execute Sql Task?
Hi everyone,
How to define a Input variable in a Execute Sql Task?
I've defined a User::Inicio variable which contains 4 as value.
In Parameter Mappins it has been defined. Then, I've gone to General->Sql Statement and allocated the following SQL Statement:
UPDATE CARGAPROCESOS SET FECHAULTIMACARGA = [Inicio]
or
UPDATE CARGAPROCESOS SET FECHAULTIMACARGA = [User::Inicio]
Anyway, I'm stuck, both did not work
Thanks in advance for your comments
Enric,
Use an expression in SQlStatementSource property of your Execute SQL task to build your SQL statement:
"UPDATE CARGAPROCESOS SET FECHAULTIMACARGA = " @.[User::Inicio]
Rafael Salas
|||Hi Rafael,
Thanks for your quick answer but it doesn't work.
[Execute SQL Task] Error: Executing the query "UPDATE CARGAPROCESOS SET FECHAULTIMACARGA = [@.User::Inicio]" failed with the following error: "Parameter name is unrecognized.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Let me know, I can imagine that's a silly thing..
|||
Well, the error talks abour the ResulSet porperty; what is your value for that? what is you set that to None. Also i think you do not need anything in your parameter tab since the SQL statement is being created by the expression
RAfael Salas
|||Rafael is telling you to set an Expression for the SQLStatementSource property and not set the property value directly. Looks like you set the SQLStatementSource directly to "UPDATE CARGAPROCESOS SET FECHAULTIMACARGA = " + @.[User::Inicio]. To set an expression for the SQLStatementSource property click on the Expressions node on the left hand side of the Execute SQL Task Editor dialog.|||Hi,
You mean you want to use the user variable in your query right?
Refer this:
http://msdn2.microsoft.com/en
|||Thanks to all of you