October 28, 2010 at 1:54 pm
Hi everybody, I have a Execute SQL Task with the follow:
ResultSet in SingleRow
SQLStatement: select FLAG_PRO as Flag_Arch from CARGA_ARCHIVO where FEC_1RALINEA_ARCH=?
Result Set: ResultName->FlagArch, Variable Name->User::FlagArch
When I execute the package run without problems where found a term in FEC_1RALINEA_ARCH but when not found any value, show this error: An error ocurred while assigning a value to variable "Flag_Arch": "SingleRow result set is specified, but no rows were returned"
Please can tell me how I can do it for assign a value to my variable User::FlagArch when dont return rows.
Thanks a lot by your help.
October 29, 2010 at 7:15 am
You could change you SQL Statement to return a value if there is no record returned in your table.
select isnull(FLAG_PRO, 'Unknown') as Flag_Arch from CARGA_ARCHIVO where FEC_1RALINEA_ARCH=?
Of course the value you return would be based upon you own business requirements.
October 29, 2010 at 10:16 am
Thanks SSC Veteran!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy