|
Posted by Jim Devenish on 06/22/06 10:41
I want to create a column alias to represent the comparison of two
columns (ie a boolean result of True or False). A simple example is:
Select VehicleFinanceID, SalePrice > PurchasePrice As isProfit
>From VehicleFinance
but I get an error 'Incorrect syntax near >'
Books online states that the select_list can contain column_name or
expression
An expression is a column name, constant, function, any combination of
column names, constants and functions connected by an operator
> is a binary operator
So why do I get this error.
Incidentally, if I use an arithmetic operator such as +, there is no
problem.
[Back to original message]
|