select syntax and ORA-01797

select count(*) from (select * from ( select * from  TestLoad.dbo.T_TestType where mid = 42) main_query)
only supported Oracle, Sql server and Sybase(ASE) are not supported.

cmd.CommandText = string.Format("select count(*) from ({0}) test", task.Command);

but if we add test at last, three databases will be ok, sql like this:
select count(*) from (select * from ( select * from  TestLoad.dbo.T_TestType where mid = 42) main_query) test

but this syntax is only supported above sybase12.5.0 version. this we need note :)

today i meet a problem about Oracle
ORA-01797: this operator must be followed by ANY or ALL
it is caused by "id= (1,2,3)"
we need add some word  ater '=' like  "id= any (1,2,3)"

posted on 2012-06-21 17:11  子虚乌有  阅读(1245)  评论(0)    收藏  举报