Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Re:


Message #1 by "J House" <jesse@s...> on Thu, 28 Jun 2001 18:51:21
I beleive all you need to do is include visitors.date in your SELECT,
you cannot ORDER BY a field which is not included in the select.

> SELECT DISTINCT TOP 5 users.ID, users.realfirst, users.realsecond FROM
> (users INNER JOIN visitors ON users.ID = visitors.visitor)
> WHERE visitors.user = 1

It is not possible to use the "ORDER BY visitors.date DESC" statement, 
this throws an error. If I try to also select
> How do I accomplish this? Grateful for your help.


  Return to Index