SQL - Operators and Text fields

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Mar 26 16:50:16 CST 2003


on 3/26/03 4:38 PM, Fitzbew at aol.com at Fitzbew at aol.com wrote:

> I have a baseobject that contains two text fields: from_MMDD and to_MMDD.
> 
> This sql syntax fails:
> 
> where from_MMDD >= to_MMDD
> 
> This sql syntax works fine:
> where from_MMDD >= '0701'
>                 
> Is there a particular syntax for using such comparison operators with text
> fields within
> the same baseobject? I need to compare the contents of the two fields
> themselves.

1) you can get this functionality with use of BaseObject methods.

-- you need create Method with formula:
            "_MMDD >= to_MMDD"

-- then use it in SQL query.


2) I wonder then, why you use TEXT fields ???
If you have big text, then no sense compare it.
If you have small text then better to use VarChar fields.

-- 
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list