1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to search all tables and all fields for a string?

Discussão em 'StackOverflow' iniciado por fdantas, Abril 28, 2015.

  1. fdantas

    fdantas Administrator Moderador

    I want to search all fields in all tables of a database for a user supplied value and display records which contain that input keyword. Something like this:

    FOR EACH _file WHERE (NOT _file-name BEGINS "_" AND NOT _file-name BEGINS "sys")
    NO-LOCK:

    FOR EACH _field OF _file
    NO-LOCK:

    ASSIGN
    ttable = _file._file-name
    tfield = _field._field-name .

    FOR EACH &ttable WHERE ttable.tfield MATCHES "urpon frisbee "
    NO-LOCK :

    MESSAGE "hai"
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
    DISPLAY _file._file-name .
    END.

    END.
    END.

    Continue reading...

Compartilhe esta Página