Sunday, February 19, 2012

[Execute SQL Task] Error: An error occurred while assigning a value to variable...

hi chaps

i m getting the following ERROR:

[Execute SQL Task] Error: An error occurred while assigning a value to variable "JDETimezone": "Unable to find column Timezone in the result set.".

i know what the problem is i.e. no row is returned then what is the problem

here you are.... i want to it work... strange... ok i explain...

actully i have some processign to do with variable JDETimezone even no row is returned.... can u tell me the alternative to do the follwing task...

I want to retrieve a record from some table and do some processing and if no row is present or returned then i want to do seperate processing.... can ne one help me out ?

regards,

Anas

That error usually occurs when you either don't have a column in your select statement named "Timezone", or you didn't name the resultset Timezone. You may want to check your settings.

If you want to do separate processing when no rows are returned then in the Error Flow redirect the rows instead of Failing or Ignoring them.

|||

thanx for your reply

but i sure I have both, column name Timezone in Select statement as well as in Resultset...

problem is that it doesnt return any row and causes error...Sean you are right I can use Error flow but the problem that i dont want any of my task to fail becuase i m doing error handling by Task failure event which then email the failure information to admin group

does ne one have solution of my problem?

regards,

Anas

|||

One way to implement different processing logic based on the result set row count is by having a Execute SQL task that counts the total number of rows returned by a query and assign the count to a variable which can later be used to determine the control flow.

See http://msdn2.microsoft.com/en-US/library/ms140153.aspx

No comments:

Post a Comment