How to convert Advanced Query to Ansi SQL?

How to convert Advanced Query to Ansi SQL?

Is it possible to usa some API to validate and convert an Advanced Query statement to Ansi?

Why? I1m working on an App that enables the user to create his own Advanced Queries in Runtime. Só I would like to validate sintaxe, giving him some feedback when errors are found, and to run the statement aggainst database to export the result set as a CSV file.
Hi João,

Have you looked the component SQLMap.

By your description this one seems to be what you want or at least provide you with a quick start.

Yes, I have already tested it. But it doesn't work in some cases. Unfortunately I couldn't map all these cases, and I would like to use something error proof. But thank you for the tip.