Multiple customers in production, in particular those using SQL callbacks, have encountered a situation where there was an error interpreting field content.
FairCom RTG offers a SQL syntax extension, ctoption(badrec), which helps identify "bad" records and fields that cannot be properly interpreted. We extend this function into the general SQL engine itself to aid identifying "bad" records for all applications.
Example:
SELECT * FROM <table> ctoption(badrec)
When using the ctoption(badrec) syntax, only failing records are returned and error information is logged in sqlserver.log.