This project has moved and is read-only. For the latest updates, please go here.

order as a column name

Topics: Developer Forum
Oct 24, 2013 at 11:51 AM
public class Trade
    public int order, login;

Select * from Trades where order = 2;
select * from Trades t where t.order = 2;

both query give exception.

An unhandled exception of type 'NQuery.CompilationException' occurred in NQuery.dll
Additional information: Query could not be compiled.
Found 'ORDER' but expected '<Identifier>'.

Found '=' but expected 'BY'.

Oct 24, 2013 at 11:13 PM
Edited Oct 24, 2013 at 11:14 PM
order is a keyword. Put it in parenthesis, like this:
 select * from Trades where [order] = 2
Does this help?
Marked as answer by idris_tas on 10/25/2013 at 1:29 AM
Oct 25, 2013 at 9:28 AM