Hitachi

Hitachi Advanced Database SQL Reference


1.15.7 If message KFAA30401-E is displayed

Check if there is an error in the specification of a search condition.

Example 1:

SELECT "USERID","PUR-CODE","PUR-DATE" FROM "SALESLIST"
    WHERE "USERID">=DATE'2011-09-06'
 
KFAA30401-E The data types of both operands specified in predicate
"COMPARISON" are not compatible. (query number = 1)

In this example, the underlined portion of the statement is incorrect. It specifies an impossible condition in which you are attempting to compare the USERID column (customer ID) to the date range September 6, 2011 or later. Examples of correct specifications are as follows:

Example 2:

SELECT "USERID","PUR-CODE","PUR-DATE" FROM "SALESLIST"
    WHERE "PUR-DATE">='2011-9-6'
 
KFAA30401-E The data types of both operands specified in predicate
"COMPARISON" are not compatible. (query number = 1)

In this example, the underlined portion of the statement is incorrect. The correct specification is DATE'2011-09-06'.