This project has moved. For the latest updates, please go here.

order as a column name

Topics: Developer Forum
Oct 24, 2013 at 10: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'.

Coordinator
Oct 24, 2013 at 10:13 PM
Edited Oct 24, 2013 at 10: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 8:28 AM
yes.
thanks.