1

I have tried to run this SQL-92 query:

select (Rating * 100.0) as ratingCalc from BlogPostStatsPartIndex;

on "Run SQL Query" page in admin but it has failed with error:

"Syntax error, expected: ALL, DISTINCT, id_simple, * at line:0, col:7".

This query executes correctly on SQLite but "OrchardCore.Queries.Sql.SqlParser" class produces syntax error for this. This query looks like SQL-92 compatible. I have looked at Orchard Core's "SqlParserTests" implementation, but I haven't found any example how to use arithmetic operators in select clause.

  • Note that SQL-92 has different conformance levels. _Entry level_ does only support upper case SQL identifiers, or was it keywords. (If I remember it correctly - it was such a long time ago.) – jarlh Aug 01 '22 at 11:46

0 Answers0