In these sorts of scenarios where you need to use a SELECT statement with complex requirements for dictionary items and especially when you have multi-valued and/or sub-valued data in the file(s), I usually create a new dictionary item in the file that is used for the SELECT statement as an I-correlative dictionary item that uses the SUBR function to call a jBASE subroutine. That way, you can just pass in the Item ID of the file from the SELECT statement and have the subroutine execute all the business logic of opening and reading the other files and then return a value of 1 or 0.
You cannot use these types of dictionary items in SQL but if you're executing the SELECT statement from the command line or from a jBASE basic program, then you can use the SUBR function in the dictionary item. On Monday, October 15, 2018 at 10:03:20 AM UTC-7, Jose L wrote: > > Hello guys, > > I have three tables A, B and C. The records in table A contain a field > ID.B and a field ID.C, that indicates the ID of an associated record in > tables B and C. Each record in B and C also contain a field called > NATIONALITY, which is single value for B, and multivalue for C. We want to > retrieve all records in A such that the field nationality in B is not among > the values of the fields nationality in C. So it would be something like > this(pseudocode) > > SELECT A WITH EVAL 'TRANS("B",ID.B,NATIONALITY,"X") IN > TRANS("C",ID.C,NATIONALITY,"X") ' EQ 0 > > What will be the best option to do this? > > Thanks > > JL > > -- -- IMPORTANT: T24/Globus posts are no longer accepted on this forum. To post, send email to jBASE@googlegroups.com To unsubscribe, send email to jbase-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jBASE?hl=en --- You received this message because you are subscribed to the Google Groups "jBASE" group. To unsubscribe from this group and stop receiving emails from it, send an email to jbase+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.