View Single Post
  #9 (permalink)  
Old March 30th, 2005, 08:08 PM
ibi ibi is offline
Registered User
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts


Removing the paranthesis didn't change anything. Removing the WHERE clause altogether DID extract only the top 10 rows.

I tried this.... and it works....

strSQL = "SELECT TOP 10 * FROM (SELECT Product.* " &_
    "FROM Product " &_
    "WHERE (((Product.ManufacturerFeaturedOrder) Is Not Null) AND ((Product.ManufacturerID)=" & man & ") AND ((Product.Active)=True)) " &_
    "ORDER BY Product.ManufacturerFeaturedOrder)"

So I'm selecting the TOP 10 from the query which I was originally trying to take out the top 10 from!

Now this should work in theory.. which it does.... but it's unnecessary.. It should work straight out.

I removed the check for NULL fields and also the WHERE clause altogether, keeping just the ORDER BY clause, still having the total number of rows returned!

So it isnt the WHERE clause either.. I've got it working now.. just confused over why it's not working how it *should*

Hope this post might help someone in the future, and any ideas on the problem still appreciated!


Reply With Quote