Consultor Eletrônico



Kbase P176494: Error 7481 when attempting to use SQL-92 CONVERT function to DateTime
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/1/2010
Status: Unverified

SYMPTOM(s):

Error 7481 when attempting to use SQL-92 CONVERT function to DateTime

Inconsistent types (7481)

Using CONVERT as follows:

CONVERT ('DATETIME', <value>)

SELECT CONVERT ('DATETIME', <value>) FROM pub.someTable

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems

CAUSE:

This is expected behaviour. The CONVERT function expects the SQL data type. The correct SQL date-time data types are:

DATE
TIME
TIMESTAMP
TIMESTAMP WITH TIME ZONE

FIX:

Use the correct date-time type:

CONVERT ('TIMESTAMP', <value>)