#define d_sum price*d_quantity
SELECT 2*d_sum+1000 as hello FROM invoice
>>#define d_sum price*d_quantity as hello
>
>I'm sorry. The sample code was too simplified. I need to use d_sum inside expressions in SELECT statement.
>Real code where I tried your suggeston was
>
>
CREATE CURSOR invoice ( price N(12,2), quantity N(2), packing N(2))
>
>#define d_quantity quantity*packing
>#define d_sum price*d_quantity as hello
>
>SELECT 2*d_sum+1000 FROM invoice
>
>but this causes syntax error in select line