Whats wrong? ? ?

Results 1 to 2 of 2

Thread: Whats wrong? ? ?

  1. #1
    Join Date
    Dec 1969

    Default Whats wrong? ? ?

    I have a problem with selecting out the 10 newest added urls from my access database.<BR>When i use the sql-statement below i got out 12 urls instead of<BR>10. Total urls is 14 in the database. Its so confusing.<BR><BR>What the heck is wrong?<BR><BR>SQL3 = "SELECT TOP 10 datum, url, Id From sajter Order by datum desc"<BR><BR>hope someone can solve this problem.

  2. #2
    Scott S Guest

    Default RE: Whats wrong? ? ?

    Hello, <BR><BR>I thought it was a kind of strange problem & then i tried it myself, SELECT TOP 4 * FROM SAMPLETABLE returned 4 but, SELECT TOP 5 * FROM SAMPLETABLE returned 6.. This is strange behavior. Then I tried SELECT TOP 10 * FROM SAMPLETABLE & that returned 12 i believe. <BR><BR>To make sure that my syntax wasnt wrong i fired up SQL Server & tried the same example there. SQL Server returned the correct number of records every time. The only thing i can figure is the SELECT TOP # is not implemented in the Jet SQL engine. It appears to be sort of there but sort of not, if that makes any sense. I&#039d reccomend using SQL Server if possible. if you cannot return SQL server, & you still need 10 exactly, issue the queries as you have been doing & on the client side only display 10. <BR><BR>Hope that helps<BR>Scott S<BR><BR>sargent@ssmagic.com<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts