Within a paragraph, is there a way to take the results of one SELECT statement and use them in another SELECT statement?
For example, if I have the following SELECT statement:
SELECT PROGRAM.REQ WITH CREDITS GT 0 AND CREDITS LT 15
SAVING UNIQUE PROGRAM.REQ.PROG.ID
SAVE.LIST SHORT.PROGRAMS
Could I then take the savedlist SHORT.PROGRAMS and use it within another SELECT statement like:
SELECT PROGRAMS WITH PROGRAM.ID
<in the savedlist SHORT.PROGRAMS>
I tried searching the "Using UniQuery 8.23" manual for any keywords or examples that might help, but had no luck. Is there a better manual or one that specifically discusses what EVAL can do?
Right now I am manually taking the results and placing them into the select statement. So if SELECT statement 1 returns One Two Three, then I just do:
SELECT PROGRAMS WITH PROGRAM.ID
EQ 'One' 'Two' 'Three'
Which works for my purposes, just seems very inefficient. Thank you!
BTW Select lists can also be used in UniverseSQL.
LT and GT and their variants can be used for the criteria but SQL also supports BETWEEN.
Then use GET.LIST as Ian McGowan advised to activate the list in the subsequent sentence of query.
Select lists can be applied in UniverseSQL too. Though this particular query is somewhat redundant in this context they are specified like this.
With an @SELECT entry in DICT PROGRAM this query can be used.