Just to close this query: I tried the statements below and all gave the same results so I went back to my command file and returned it to how I _thought_ it was before I changed the order of the where and sort clauses and that, too, now worked at expected.
Obviously I must have had some other error before that was effecting the result that got corrected by the two changes somehow. Thanks to everyone for their help, Regards, Alastair. select * from Track_Zero_View where mainname = 'young' order by mainname, firstname, releasesequence select * from Track_Zero_View order by mainname, firstname, releasesequence where mainname = 'young' select * from Track_Zero_View where count > 4900 order by mainname, firstname, releasesequence select * from Track_Zero_View order by mainname, firstname, releasesequence where count > 4900 print Last100_HTML where count > 4900 order by mainname, firstname, releasesequence print Last100_HTML order by mainname, firstname, releasesequence where count > 4900 ----- Original Message ----- From: "Alastair Burr" <[EMAIL PROTECTED]> To: "R:Base ListServer" <[EMAIL PROTECTED]> Sent: Friday, May 10, 2002 11:18 AM Subject: Sequencing the Where & the Sort statements > Hello all, > > I have always believed that it made no difference whether you wrote a > command as: > > select ... from ... where ... order by ... > > or as: > > select ... from ... order by ... where ... > > However, I have a report where it does appear to matter. > > If I use: > > PRINT Last100_HTML + > WHERE COUNT > .vCount + > ORDER BY MainName, FirstName, ReleaseSequence > > the sort that is applied appears to be by FirstName then MainName then > ReleaseSequence! However, if I write the command as: > > PRINT Last100_HTML + > ORDER BY MainName, FirstName, ReleaseSequence + > WHERE COUNT > .vCount > > then the sort works as expected. There are no break points defined on the > report. > > Is this something that has changed over the years and I simply haven't > noticed or is it to do with the way that data is selected when compared to > the count (or any other?) function? > > Thanks for any enlightenment, > Regards, > Alastair. > > ---------------------------------- > A D B Burr, > St. Albans, UK. > ---------------------------------- > [EMAIL PROTECTED] > ---------------------------------- > > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
