~Vamsi
12th June 2002, 02:57
Most of us know the difference between inrange and between in Baan SQL. This is the situation I had:
+Selection Range----------------------------------+
¦ Business Partner FFFFFFFFF - FFFFFFFFF ¦
¦ Year/Period FFFF/FF - FFFF/FF ¦
+-------------------------------------------------+
The Year/Period were coming from tfacr200. In this table (BaanERP) they are not a combined field. My need was to be able to select contiguous year/periods. For eg:Year/Period 2001/10 - 2002/02 is a valid range. The usual select will not work here.

Ok, here is the solution I found perusing some scripts in "tf". The select needs to look like this.select tfacr200.*
from tfacr200
where {tfacr200.year, tfacr200.prod} between {:year.f, :prod.f} and
{:year.t, :prod.t}...

The idea of creating a combined field on the fly seemed to be very nifty to me. Thought I would share this with you guys. If you already knew this please ignore my excitement :).