To look for field<decimals> occurrences inside cast(...) statements, assuming there are no mismatched parenthesis, with GNU grep or compatible built with PCRE support:
<abc.txt grep -Po 'cast(\((?:[^()]++|(?1))*\))' |
grep -Po '\bfield\d+\b'
That's using PCRE's ability to define recursive regular expressions. Above (?1) refers to the regular expression enclosed in (...), so we're looking for cast followed by a regexp "R" that starts with ( followed by any number of either non-parens (++ is just the non-backtracking version of +) or more "R"s followed by ).
That allows us to find the matching ) for the opening ( that follows cast.
The second grep only extracts the field<decimal> (surrounded by word boundaries (\b)) from those cast(...) statements that the first grep extracts.
That assumes those SQL statements are on a single line. If not, you can add the -z option to the first grep.