How to achieve ORing in join cursors -
02-27-2006
, 07:26 AM
1. Consider following scenario -
* There is one primary table say 'cars', having key as 'carId' and
data part containing a structure of some inforamtion like color,
make, doorcount etc.
* suppose secondary indices are created for attributes color,
doorcount which may have duplicate records.
* Now if I want to obtain a join cursor on 'cars' based on following
info
color = red OR black
doorcount = 4 [b:f81fb95846]OR[/b:f81fb95846] 5
Is such kind of query be solved using join cursors? if not is there
any alternative way to do this?
2. A get call on a cursor (to secondary table) with DB_SET sets the
cursor to the record having key equal to the key specified as
parameter to this call. However if I want this cursor to point to
those records only which are -
Case 1: having key [b:f81fb95846]Not equal[/b:f81fb95846] to the
key passed as
argument to get call
Case 2: having key [b:f81fb95846]Less than[/b:f81fb95846] the key
passed as
argument to get call
Case 3: having key [b:f81fb95846]Greater than[/b:f81fb95846] the
passed key as
argument to get call
Please let me know if there is some way to achieve this.
---
-Dhiraj |