Searching and returning the number of matches found

Use the NUMBEROFMATCHES function to determine how often the search value is found in each text document.

SELECT AUTHOR,TITLE,
        NUMBEROFMATCHES(COMMENT, '"book"')
        FROM DB2EXT.TEXTTAB

NUMBEROFMATCHES returns an integer value.