Hi, I'm aware of special, oracle ef core query translation, with oracle odp.net e.g. this post for instance :
https://forums.oracle.com/ords/apexds/post/ora-00904-t-value-invalid-identifier-using-sqlquery-and-si-2228
But when we want to pass a simple raw SQL query with ef core like this one, using SqlQueryRaw ef core function :
int? lastVal = _applicationDbContext.Database.SqlQueryRaw<int>(@"SELECT pack_util_metier.get_current_site_no AS ""Value"" FROM DUAL").FirstOrDefault();
Oracle is transforming this query with something like
SELECT "t"."Value"
FROM (SELECT pack_util_metier.get_current_site_no AS "Value" FROM DUAL) "t"
So we are forced in our C# code to explicitely add AS “Value” in each query we want to pass.
Furthermore a simple query to get a db sequence like “SELECT myseq.NEXTVAL FROM DUAL” needs to enclosed in a function otherwise it doesn't work because of:
SELECT "t"."Value"
FROM (SELECT myseq.NEXTVAL AS "Value" FROM DUAL) "t" results in a ora-02287 sequence number not allowed here.
Is there an option with oracle ef core driver to bypass this behavior ?
Thank's
Olivier