Consultor Eletrônico



Kbase P133117: SQL: Error (7481) passing logical fields to the CONVERT or CAST functions or performing arithmetica
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   09/07/2008
Status: Unverified

SYMPTOM(s):

SQL: Error (7481) passing logical fields to the CONVERT or CAST functions or performing arithmetical operations on logical fields.

[DataDirect][OpenEdge JDBC Driver][OpenEdge] Inconsistent types (7481)

Executing statements similar to one of the following:
SELECT CAST(LogicalField as INTEGER) FROM pub.Customer
SELECT CAST(LogicalField AS CHARACTER) FROM pub.Customer
SELECT CAST(LogicalField AS DECIMAL) FROM pub.Customer
SELECT CONVERT ( 'CHARACTER', LogicalField) FROM pub.Customer
SELECT CONVERT ( 'DECIMAL', LogicalField) FROM pub.Customer
SELECT CONVERT ( 'INTEGER', LogicalField) FROM pub.Customer

SELECT (LogicalField + 1) FROM pub.Customer
SELECT (LogicalField - 1) FROM pub.Customer
SELECT (LogicalField / 1) FROM pub.Customer
SELECT (LogicalField * 1) FROM pub.Customer

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

CAUSE:

Passing logical fields as arguments or parameters to the SQL CAST or CONVERT methods is not supported. Also, performance of arithmetical operations on logical fields is not supported.

FIX:

Do not pass logical fields as parameters to either the CAST or CONVERT methods. Also, do not perform arithmetical operations on logical fields.