DB2 - Problembeschreibung
Problem IC89906 | Status: Geschlossen |
CAST() IN QUERY USED IN .NET FRAMEWORK DOES NOT ADEQUATELY RESOLVE PRECISION OF DATETIME DATATYPE IN IDS DATABASE. | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A10 - DB2 | |
Problembeschreibung: | |
When using 'CAST() as' clause in a query, .NET Framework is unable to accurate gauge the precision of the DateTIme data type. Instead, it uses the maximum precision for the data type (Year to fraction(5)). This becomes a problem when the cast is part of SELECT ... UNION... statement, and the precision of the cast does not match the precision of a column type. In that scenario, the following error results: <m:internalexception><m:message>ERROR [IX000] [IBM][IDS/UNIX64] Corresponding column types must be compatible for each UNION statement. <---------------- </m:message><m:type>IBM.Data.DB2. DB2Exception</m:type><m:stack trace> at IBM.Data.DB2.DB2Command.ExecuteReaderObject(Command Behavior behavior, String method, DB2CursorType reqCursorType, Boolean abortOnOptValueChg, Boolean skipDeleted, Boolean isResultSet, Int32 maxRows, Boolean skipInitialValidation) at IBM.Data.DB2.DB2Command.ExecuteReaderObject(Comman dBehavior behavior, String method) at IBM.Data.DB2.DB2Command.ExecuteReader(CommandBehavi or behavior) at IBM.Data.DB2.DB2Command.ExecuteDbDataReader(Command Behavior behavior) at System.Data.EntityClient.EntityCommandDefinition.E xecuteStoreCommands(En tityCommand entityCommand, CommandBehavior behavior)</m:stacktrace></m:internalexception> Operating system and level Windows Client, server, and gateway information Client connects to server, no gateway involved. Server information, if applicable Will get an update defect. How to reproduce the problem Yunming Wang reports reproducing the problem with the test case from defect wsdbu00956011. | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * .Net users * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * upgrade to db2 client v10fp3 * **************************************************************** | |
Local-Fix: | |
Either restructure the query so a UNION is not used, which makes the problem moot, or modify DateTime columns to maximum precision of Year to Fraction(5) so the problem is not visible. | |
verfügbare FixPacks: | |
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows | |
Lösung | |
upgrade to db2 client v10fp3 | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Bug-Verfolgung | |
Vorgänger : APAR is sysrouted TO one or more of the following: IC97005 Nachfolger : | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 29.01.2013 24.10.2013 24.10.2013 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.1.0.3 | |
10.1.0.3 |