Using method in SQL statement

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Nov 19 07:22:27 CST 2003


on 11/19/03 2:08 AM, Tim James at tjames1 at bigpond.net.au wrote:

Hi Tim,

> Is it possible to use a method field in a sql statement if the method
> (margin is its name) is calculated as follows
> 
> round((1-(costprice/(recretail/1.1)))*100,2)

In Valentina 1.x no.

This will work in 2.0

For now you need to create BaseObject method with that formula


> where recretail and costprice are double fields and method is defined
> as double also
> 
> I know I can use method such as Upper(surname) in sql search but are
> there limitations on the use of calculated methods
> 
> I can display the method field using an sql statement but apparently
> not use it  as follows
> 
> select margin from stock where margin > 25

Why?

You can                 SELECT method,
Search on method        WHERE method > 25
Sort on method          ORDER BY method

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list