SQL Hints

psilva

Member
This function in the Oracle.pas unit

// Remove SQL Comment from a string
function RemoveSQLComment(const ASQL: string): string;

remove all the comments. But not all that starts with /* is a comment. It can be a sql hint so I don't think that is a good idea to remove all, because when you do a count(*) taking all the hints out, it takes, in special cases, to long to get the result.
 
Sometimes the hints should be removed, sometimes they should not. In the current release this function is different:

function RemoveSQLComment(const ASQL: string; KeepHints: Boolean): string;
 
Back
Top