meta data for this page
  •  

F_BLOBCMP

input/output-compatibility to rFunc (B_STRCMP)

Entrypoint b_strcmp not compatible with UTF-8 - if needed please ask


Inputs/Outputs

   Input     BLOB        BLOb 1
             BLOB        BLOb 2
   Output    INTEGER     output > 0 : BLOb 1 is smaller than BLOb 2
                         output = 0 : BLOb 1 = BLOb 2
                         output < 0 : BLOb 1 is greater than BLOb 2

Syntax

   Attention: in original rFunc-functions B_STRCMP the output positiv or negativ is different to the rFunc-String-function 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 (für TestISO.GDB/FDB)
   SELECT 0 AS ISCORRECT, F_BLOBCMP(TEXTBLOB, TEXTBLOB) FROM BLOBTEST WHERE BLOBTESTID = 3;
   SELECT 1 AS ISCORRECT, F_BLOBCMP(TEXTBLOB, (SELECT TEXTBLOB FROM BLOBTEST WHERE BLOBTESTID = 2)) FROM BLOBTEST WHERE BLOBTESTID = 3;
   SELECT -1 AS ISCORRECT, F_BLOBCMP(TEXTBLOB, (SELECT TEXTBLOB FROM BLOBTEST WHERE BLOBTESTID = 3)) FROM BLOBTEST WHERE BLOBTESTID = 2;
   SELECT NULL AS ISCORRECT, F_BLOBCMP(NULL, NULL) FROM BLOBTEST WHERE BLOBTESTID = 3;