I have the following query performed over OracleConnection
(latest odp.net.managed package).
const string sql = @"select MyCol, count(1) Count from T group by MyCol";
dynamic[] rows = DB.Query(sql).ToArray();
It runs fine, however resulting dynamics have second property named as COUNT. Why? How can I fix it?
Enclose your alias in double quotes and oracle preserves whatever the case you specify.
const string sql = @"select MyCol, count(1) ""Count"" from T group by MyCol";