Informix error in datareader source
Hi there,
I'm using SSIS and I'm entering a sql command in the expression builder of the data flow where I have a datareader source. I want to get the data for the dates of the week.
I already got it from a table and put it in a string variable.
So I have the dates like this in the variable name "@[User::date]"
'5-15-2012', '5-16-2012', '5-17-2012', '5-18-2012', '5-19-2012', '5-20-2012', '5-21-2012'
I have this variable in my SSIS package @[User::date]
HERE's the query for the datareader source:
SELECT sum (a.1) aa, sum (a.2) bb, sum (a.3) cc, a.4, a.date data FROM table WHERE date in (+@[User::date] +)
and a.4 = 3 Group By date, a.4
but the package fails at the data reader source step and I get this error :
[DataReader Source [1325]] Error: System.Data.Odbc.OdbcException: ERROR [HY000] [Informix][Informix ODBC Driver][Informix]Invalid year in date at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior,
String method, Boolean needReader) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior
behavior) at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PreExecute() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper90 wrapper)
Can you help me please?
Thanks,
sql user_m
May 27th, 2012 10:46am
Hello sql user_m,
I am moving your case to the SSIS forum so that you can get better support.
Thanks.Vicky Song [MSFT]
MSDN Community Support | Feedback to us
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2012 11:31pm