Consultor Eletrônico



Kbase P84895: What equivalent of LOOKUP for SQL92 queries?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

What equivalent of LOOKUP for SQL92 queries?

GOAL:

How to replace LOOKUP from sql89 queries when using SQL92?

FIX:

The two following SQL92 functions can be used to rewrite statements with LOOKUP:

INSTR ( char_expression1, char_expression2 [, start_pos [, occurrence]])
. start_pos is 1 by default
. occurrence is 1 by default
If any of the argument expressions evaluates to null, the result is null.

LOCATE( char_expr1, char_expr2 [,start_pos])
. start_pos is 1 by default
If the search fails, the result is 0.
If either character expression is null, the result is a null value.