Hi,
We are loading the data from seq file to SQL server table and getting the below error randomly when we run the job again after failure with out any changes this is going to run fine. I am not sure what could be the Issue. please some body let me know what could be the reason for this random error and let me know if any more details needed.
SQLSTATE=22008, DBMS.CODE=241
[DataStage][SQL Client][ODBC][IBM(DataDirect OEM)][ODBC SQL Server Driver][SQL Server]Conversion failed when converting date and/or time from character string.
Thanks,
Rgr
Error while loading in to SQL SERVER table
Moderators: chulett, rschirm, roy
Error while loading in to SQL SERVER table
Thanks,
RGR
RGR
While I cannot address the sporadic problem, I would recommend doing your string-to-date or string-to-time conversion explicitly in your DataStage job and only sending a date/time/datetime to SQL server. In your job you can use the IsValid() function to ensure that your source string is indeed valid instead of letting a default conversion outside of DataStage detect the problem.
By doing this you might also find the source of your bad data and sporadic problem.
By doing this you might also find the source of your bad data and sporadic problem.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
To use ODBC the string needs to be in ODBC-legal format, specifically CCYY-MM-DD for dates. If, for example, you are reading a string that contains a timestamp and trying to implicitly convert it into a date, you will get this kind of error.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
We still haven't come anywhere close to solving the issue of why after it fails it reruns successfully with the same data. Adding in explicit conversions and validity checks could help narrow that down, be sure to come back once you've done that and let us know where things stand.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers