meta data for this page
  •  

F_STRCMP

input/output-compatibility to rFunc (STRCMP)

Entrypoint r_strcmp not compatible with UTF-8 - use U_STRCMP

U_STRCMP

function from adhoc

Entrypoint u_strcmp compatible with UTF-8


Inputs/Outputs

   Input      CSTRING(8190)      String 1
              CSTRING(8190)      String 2
   Output     INTEGER            output < 0 : string 1 smaller than string 2
                                 output = 0 : string 1 equal to string 2
                                 output > 0 : string 1 greater than string 2

Syntax

   Attention: in original rFunc-functions STRCMP the output positiv or negativ is different to the rFunc-BLOb-function B_STRCMP - in string-function a positiv output meens, that the first string is greater, in BLOb-function it meens, that the second BLOb is greater. For compatibility reasons the FreeAdhocUDF do exactly the same.
   In Linux the value of output is other than in Windows!
   TestSQL
   SELECT 0 AS ISCORRECT, F_STRCMP('Pauline ist im Urlaub', 'Pauline ist im Urlaub') FROM RDB$DATABASE;
   SELECT 73 AS ISCORRECT, F_STRCMP('Pauline ist im Urlaub', 'Paul ist im Urlaub') FROM RDB$DATABASE;
   SELECT -73 AS ISCORRECT, F_STRCMP('Paul ist im Urlaub', 'Pauline ist im Urlaub') FROM RDB$DATABASE;
   SELECT NULL AS ISCORRECT, F_STRCMP(NULL, NULL) FROM RDB$DATABASE;