• The substring functio should be:

    SUBSTRING(name,1,2) = "ab"

    In a more general way the FINDSTRING function might be usefull:

    FINDSTRING(name, "ab", 1) == 0

    You can also use the LEFT function in this case.