V4RB SQL Select Problem

Ruslan Zasukhin sunshine at public.kherson.ua
Tue Oct 14 10:13:58 CDT 2003


on 10/14/03 10:05, Francois Van Lerberghe at fvanlerberghe at freegates.be
wrote:

Hi Cindy,
 
> le 14-10-03 7:44, Cindy <alvin at ins.co.nz> a écrit :
> 
>> I thought I had fixed it but seems I was wrong. I cannot get a select query
>> to compare one field with another field.
> 
> I don't think Valentina allow us to compare 2 fields in SQL query.

Correct.

This works in 2.0

>> My Age-3 (now AgeN3) field works
>> out the age of the student less 3 years. I then want to know all students
>> who have a ministry year that is less than or equal to that method field
>> (AgeN3). Both in viSQL and in V4RB I get a 616 error and the select fails. I
>> can display all with a ministry year less than 3, for example, but that is
>> not what I want. I want to bring up a select based on the results of two
>> different fields - only select the records whose ministry year is less than
>> their age-3.
> 
> I think you could use a method field in witch you do the calculation (Age -
> Ministry_Year). Now you can do :
> 
> Select ... From Students WHERE Age_Years <= 8 AND AgeLessMinistry_Year <= 3

Correct.

Cindy, you need create BaseObject method and use it in query.

-- 
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