SQL Server 2000 BUG: La UNION può ritornare un tipi di dato non corretto
Pubblicato in Database
SYMPTOMS
Consider the following scenario. In Microsoft SQL Server 2000, char and varchar data types are combined in a UNION operation. If the UNION operation is included in a view or in a subquery, the return data type of the combined column is char. If the UNION operation is a stand-alone query, the return data type of the combined column is varchar.
WORKAROUND
To work around this problem, manually convert the data types from char to varchar by using the cast function or the convert function.