Skip to Content
0
Former Member
Dec 28, 2007 at 07:11 PM

CR equivalent to SQL "IN" keyword

35 Views

Post Author: mcatd

CA Forum: Formula

I have a set of XML-generated data, arranged in the XML equivalent of tables. One "table," BASE, shows all bus routes that originate at a certain base. Another "table," DRIVERROUTES, shows all bus routes a given driver is authorized to drive.

What I want is all the routes at a certain base that the given driver is NOT authorized to drive. If I could use SQL, then I could simply query for all routes that are in BASE but not in DRIVERROUTES. But I can't use SQL. The querying part all happens upstream from me, the report writer.

I've tried to approach this with joins, but haven't had any luck so far. If I put in a <> join, then I get either a) a gigantic set of every possible combination of non-matching records, or b) a message telling me I can't meddle with an existing join.

How, in Crystal, can I compare the contents of two "tables" and select based on the comparison? Crystal's "IN" keyword wants me to actually type out an array rather than passing, say, a table name.

I'm using Crystal 10.