[ALL] let's think about Query Language for 2.0

Ruslan Zasukhin sunshine at public.kherson.ua
Fri May 16 21:16:56 CDT 2003


on 5/16/03 7:15 PM, Suros, Juan at Juan.Suros at kyocera.com wrote:

> !@#$% Outlook. Here is the complete post I intended to send...
> 
> 
> Ruslan,
> 
> 
> Here's an example of how this problem is solved in an existing system. In ABAP
> (script language of SAP R/3) there exists a standardized structure called
> SELECT-OPTIONS.
> 
> field        type
> -----------    ----------------
> SIGN        char(1)
> OPTION    char(2)
> LOW        data dictionary dependant
> HIGH        data dictionary dependant
> 
> SIGN:    can be {I,E} to Include or Exclude an expression
> OPTION: can be {EQ,NE,GT,GE,LT,LE,BT} which are equivalent to
> (=,!=,>,>=,<,<=,BETWEEN)
> LOW: low value of range (or single value)
> HIGH: high value of range
> 
> To use this functionality, I create a range table and fill it with query
> records:
> 
> RANGES: range_t1 FOR table1-field3.
> 
> range_t1-SIGN1 = 'I'.
> range_t1-OPTION = 'EQ'.
> range_t1-LOW = 'VALUE1'.
> APPEND: range_t1.
> range_t1-SIGN1 = 'E'.
> range_t1-OPTION = 'BT'.
> range_t1-LOW = 'VALUE2'.
> range_t1-HIGH = 'VALUE3'.
> APPEND: range_t1.
> 
> This range range_t1 now is the equivalent of the expression "f3 = 'VALUE' AND
> NOT f3 BETWEEN 'VALUE2' AND 'VALUE3'".

Yes, something about similar I think.
Just little more readable and compact and comfortable.

> In ABAP this query could be used in the
> following ways:
> 
> SELECT * FROM table1 WHERE f3 IN range_t1.

This we cannot use in languages as RB and VB.
ABAP can do this because it is scriptable.

> or
> 
> IF f3 IN range_t1.
> "Do something here
> ENDIF.
> 
> This is just an example, I am interested to see what other people suggest.

Thank you for example.

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