13.07.2015 Views

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

Caché Upgrade Checklists - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> 2008.2 <strong>Upgrade</strong> Checklistreport INTEGER as the column type of var1 to ODBC and JDBC. The 0.1 value would be sent to the client as an integerand the data truncated as a consequence.In this version the SQL processor will examine all parts of the union and return the type of the highest precedence for eachcolumn. The order of precedence for <strong>Caché</strong> types is:• VARCHAR• DOUBLE• NUMERIC• BIGINT• INTEGER• SMALLINT• TINYINTThus, the querySELECT MyTinyIntField AS var1 FROM Table1UNION ALLSELECT MyIntegerField AS var1 FROM Table2UNION ALLSELECT MyNumericField AS var1 FROM Table3will return type NUMERIC for the column since it has a higher precedence than TINYINT and INTEGER.Note:Normalizing the type to the one with the highest common precedence may change the way values are displayed.Changing the apparent type from INTEGER to NUMERIC, for example, will display the results with decimalpoints.At this time <strong>Caché</strong> will only use the type precedence in UNIONs as listed above. If other types are involved, no automatictype detection will be done. The type of the union fields with the highest precedence will be returned. Other types will beignored. If a specific type is desired for the column, an explicit CAST statement must be used, for example,SELECT CAST(MyStringField AS DATE) AS var1 FROM Table1UNION ALLSELECT MyDateField AS var1 FROM Table27.2.7.8 SQL Query Collation Results Now Depend On All UNIONsBeginning wit the version of <strong>Caché</strong>, if a FROM view or subquery consists of a UNION, then the collation of a resultingfield will depend on the collations of the corresponding field/expression in all the UNION legs, using EXACT (no collation)if they do not match. In previous versions, the collation was determined by the first UNION found.7.2.7.9 Stream Coercion Not Allowed In SQL UPDATEStarting with this version, an attempt to Prepare or Compile an UPDATE statement that sets a non-stream field equal tothe contents of a stream field will now receive an error. There is no implicit datatype conversion supported for this case.For example:UPDATE SQLUser.MyTableSET MyStringField = MyStreamField ...will fail with SQLCODE = –303: No implicit conversion of Stream value to non-Stream field 'MyStringField' in UPDATEassignment is supported.The proper way to perform this assignment is to convert the fields from Stream to String using the SUBSTRING function.Suppose the length of MyStringField is 2000 characters. The statement:190 <strong>Caché</strong> <strong>Upgrade</strong> <strong>Checklists</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!