SQLProvider
SQLProvider copied to clipboard
Incorrect escaping for order keyword in Oracle
Description
I have the following query for oracle :
let qry =
query {
for cust in ctx.Onur.Customers do
join order in (!!) ctx.Onur.Customers on (cust.CustomerId = order.CustomerId)
select (cust.CustomerId)
} |> Seq.toArray |> printf "%A"
This generates the following SQL :
SELECT cust.CUSTOMER_ID as "cust.CUSTOMER_ID" FROM ONUR.CUSTOMERS cust LEFT OUTER JOIN ONUR.CUSTOMERS order on cust.CUSTOMER_ID = order.CUSTOMER_ID "
The problem is here "ONUR.CUSTOMERS order" since order is also a keyword for Oracle the query fails with a missing keyword error. If you use any other name than order the query works. So there should be a way to escape order
Related information
- Oracle 11 XE
- Windows
- Latest version of SqlProvider
- .net core 2.2