fixing sql statement generation for quoted/lowercased identifiers