[snip]
>Does U2 support indexing virtual fields, ie DATE.CUST? I don't think D3
can.

Sure, both U2 and D3 support virtual index fields.

U2 I type:
CUST:".":DATE

One caveat I know of is that in D3 you must use A-correlatives to define
the index, e.g.

Cust.date:
a5:".":6
Or 
A0(call cust.date)

Create-index myfile cust.date

Select myfile with cust.date eq "12345.]"     -> all records with cust =
12345
Select myfile with cust.date eq "12345.13809" -> cust 12345 and date =
10-21-05

However, the fact that the date in cust.date must be specified in
internal format reduces the utility of this approach, as does the fact
that indexed dates can't be selected using greater than or less than
type logic.

Selecting by customer and/or date is pretty common; I usually end up
creating a separate xref index file with the key = cust dot date and a
mv list of myfile ids in attribute 1. Then you can

select xref.file with cust = "12345" and with date ge "10-1-05" and le
"10-20-05" myfile.ids

This is usually pretty fast in itself, and you could always index cust
and date in xref.file to make it faster under some circumstances.

/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006

P.s. I did not know that that UV10 supports multiple index queries -
very cool, and good to know!
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to