David Very close.. just need the uniqueness adding.
How about simply: SELECT DISTINCT CODE FROM UNNEST LOOKUP.TABLE ON CODE WHERE @ID = 'XYZ' ORDER BY CODE; Code...... AAA BBB CCC 3 records listed. Brian > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Hona, David S > Sent: 23 January 2008 09:06 > To: [email protected] > Subject: RE: [U2] [UV] Selection help > > Okay, had a rethink now...how about UV/SQL...? ;) > > >CT LOOKUP.TABLE XYZ > > XYZ > 0001 1}2}3}4}5}6}7 > 0002 AAA}BBB}BBB}CCC}AAA}AAA}BBB > > >SELECT LOOKUP.TABLE "XYZ" > > 1 record(s) selected to SELECT list #0. > >>SELECT CODE FROM UNNEST LOOKUP.TABLE ON CODE SLIST 0 ORDER BY CODE; > CODE... > > AAA > AAA > AAA > BBB > BBB > BBB > CCC > > > >SELECT LOOKUP.TABLE "XYZ" TO 1 > > 1 record(s) selected to SELECT list #1. > >>SELECT CODE SLIST 0 FROM UNNEST LOOKUP.TABLE ON CODE SLIST > 1 ORDER BY > >>CODE; > > 7 record(s) selected to SELECT list #0. > >SAVE.LIST XYZ > 7 record(s) SAVEd to SELECT list "XYZ". > >EDIT.LIST XYZ > 7 lines long. > > ----: P > 0001: AAA > 0002: AAA > 0003: AAA > 0004: BBB > 0005: BBB > 0006: BBB > 0007: CCC > Bottom at line 7. > ----: Q > > > > > > Regards, > David > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Boydell, Stuart > Sent: Wednesday, January 23, 2008 7:29 PM > To: [email protected] > Subject: RE: [U2] [UV] Selection help > > Thanks to everyone, it's a bit less straightforward but I > have got it working by passing the list through the unix shell. > > 'SH -c "':"uv 'LIST LOOKUP.TABLE \XYZ\ CODE ID.SUP > COL.HDR.SUPP COUNT.SUP'|sort -u|tail +3":'"' > > Nb. If I use a BY.EXP ... SAVING UNIQUE I get the warning: " > SORT criteria not valid with UNIQUE keyword. Ignoring SORT options." > > Cheers, > Stuart > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
