If you mean UniVerse SQL - for a regular query in the same way as a retrieve statement, you can supply an active select list using the SLIST clause.
SELECT BOOK_TITLES WITH GENRE = "FICTION" SELECT * FROM BOOK_TITLES SLIST 0 But if you're not using it in the same way as a retrieve statement i.e. not as a key filter, or using a different SQL variant you will need to create a temporary table to join or a sub query (which often creates an internal temporary table anyway). Brian -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of George Gallen Sent: 08 April 2010 4:03 PM To: U2 Users List Subject: Re: [U2] SQL Equiv to Save-list? So for each "listname" you would need to create a new temp table, and clear the table prior to saving a list? Thanks for the info... George > -----Original Message----- > From: [email protected] [mailto:u2-users- > [email protected]] On Behalf Of Symeon Breen > Sent: Thursday, April 08, 2010 10:55 AM > To: 'U2 Users List' > Subject: Re: [U2] SQL Equiv to Save-list? > > INSERT INTO temptable (customerid) > SELECT customerid FROM invoicefile > > > You then have your temp table with customerIDs so can use as such > > select cust.name , cust.addr , cust.city from customerfile cust inner > join > temptable temp on temp.customerid = cust.id where cust.st = 'ny' > > > So you can then do > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of George > Gallen > Sent: 08 April 2010 15:09 > To: U2 Users List > Subject: [U2] SQL Equiv to Save-list? > > Is there a way in SQL without resorting to subqueries to select a > table, > then save the resulting field, > Then use that list for a future SQL query? > > ex. select customerid from invoicefile; > save the list of customerid for later use > > <later> > > get that list of customerid > select cust.name , cust.addr , cust.city, etc from customerfile > where > cust.id=(list of customerid) and cust.st='ny' > > > Or is this one of those pick "ain't it great we can do this" features? > _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.801 / Virus Database: 271.1.1/2796 - Release Date: 04/07/10 19:32:00 _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
