I'm using SubSonic 2.2 with Oracle 9.2 and .NET 2.0.
Calling SqlQuery.GetRecordCount() generates an Oracle error:
ORA-00923: FROM keyword not found where expected
The method call generates SQL which looks like the following:
SELECT count(*) as 'yadda' from SOMESCHEMA.SOMETABLE
The culprit appears to be Aggregate.ToString(). Specifically, the format string it uses contains single quotes which are not allowed (in column aliases, at any rate) in Oracle. A workaround that I've implemented was to override GetCountSelect in the OracleGenerator class which simply replaces all single quotes with double quotes:
public override string GetCountSelect()
{
return base.GetCountSelect().Replace('\'', '"');
}
I'm using SubSonic 2.2 with Oracle 9.2 and .NET 2.0.
Calling SqlQuery.GetRecordCount() generates an Oracle error:
ORA-00923: FROM keyword not found where expected
The method call generates SQL which looks like the following:
SELECT count(*) as 'yadda' from SOMESCHEMA.SOMETABLE
The culprit appears to be Aggregate.ToString(). Specifically, the format string it uses contains single quotes which are not allowed (in column aliases, at any rate) in Oracle. A workaround that I've implemented was to override GetCountSelect in the OracleGenerator class which simply replaces all single quotes with double quotes: