Thanks, Dennis. Your suggestion got me to thinking further about this and I think I boiled it down to its simplest form. I modified my program accordingly:
SET VAR vdu_prog_list TEXT -- PROJECT TEMPORARY temp_prog_list FROM prog_results USING run_type,progname + ORDER BY run_type,progname WHERE prog_run = 'Y' -- SELECT (listof(progname)) INTO vdu_prog_list FROM temp_prog_list Works for me. Thanks again. Mike Ramsour -----Original Message----- From: Dennis McGrath [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 8:54 AM To: [EMAIL PROTECTED] Subject: [RBASE-L] - Query ListOf command A temporary view to do the sorting would also work. --Dennis McGrath -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ramsour Mike Sent: Friday, December 20, 2002 7:16 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Query ListOf command Alastair: Coincidentally I just discovered today that the ORDER BY clause does not appear to work with the LISTOF function. I use this function to create a variable which is a list of programs I want to run. I loop through the variable to run the programs. As a work around I create a temporary table into which I insert the program names from a table in the desired order. I then use the LISTOF function to create my variable from the ordered list of programs. At least you know you've got company. :) Mike Ramsour voice: 740-829-4340 -----Original Message----- From: Alastair Burr [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 2:56 AM To: [EMAIL PROTECTED] Subject: [RBASE-L] - Query ListOf command This got lost in the mists of time in the sonetmail hiccup: Does anybody agree with me that this fails: SELECT (LISTOF(Extension)) INTO vResponse FROM FileExtensions order by Extension but these work: SELECT (LISTOF(Extension)) INTO vResponse FROM FileExtensions SELECT (LISTOF(Extension)) INTO vResponse FROM FileExtensions where Extension is not null SELECT (LISTOF(Extension)) INTO vResponse FROM FileExtensions where Extension is not null order by Extension (They're all single-line commands.) If so, should I expect the first method to work or not? Since then it has been discovered that the third "working" example doesn't appear to actually sort but doesn't give the error message that the non-working example does. A easy work-around of using a (temp) view to re-order the list has also been suggested and the need, or otherwise, of two pairs of parenthesis has been questioned. (R:Syntax shows both!) See what excitement you've missed while you were away! Welcome back. Regards, Alastair. ---------------------------------- A D B Burr, St. Albans, UK. ---------------------------------- [EMAIL PROTECTED] ----------------------------------

