SQL query with NOT IN
I'm trying to make a page index for my forum. There are two tables involved, "newthreads" and "replies", so therefor my SQL query is a little complicated:<BR><BR>SELECT newthreads.*, replies.repID, replies.ReplyOrder, replies.lvl, replies.repAuth, replies.repSubj, replies.repMsg, replies.repDatumtid, replies.repMember <BR>FROM newthreads <BR>LEFT JOIN replies ON newthreads.newID = replies.newID <BR>WHERE newthreads.newID NOT IN (SELECT TOP " & page*PerPage & " * FROM newthreads ORDER BY newID) <BR>ORDER BY newthreads.newID DESC, replies.ReplyOrder<BR><BR>Everything works fine, except the row starting with "WHERE newthreads.newID NOT IN...". page is the current page on the forum (duh), default value 0, and PerPage is the number of threads per page on the forum (currently 10).<BR><BR>What I'm trying to do is selecting all posts except the [current page*10] first. This is my first time using NOT IN, so please don't kill me if this is easy.<BR><BR>/ jeps0
NOT syntax error
NOT is treated like a negative sign in math. It always goes in the front:<BR><BR>"WHERE NOT newthreads.newID IN..."
NO I believe he is using it just right <eop