Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>(<strong>Edit:</strong> rearranged to focus on likely culprit)</p> <p>No, you can't get the last record easily. You can try <code>Select Top 5000 . . .</code> etc., raise the value if it works, and lower the value if it doesn't, and zero in on it that way. But, it is unlikely that a particular is record is causing the problem. I don't think there's <em>bad data</em> somewhere. It's the query.</p> <p>Focus on the Sum in the select query. Take that out, and you'll likely have the query work. It could well be that the sum overwhelms the numeric type that sql is using to add your values. Actually, the more I think about it, this is probably it. Yeah. If it is, you'll need to force that to a type that can handle larger numbers, like this: </p> <p><code>SELECT blah blah, SUM(CAST([TotaalPrijs]/([tbl_ArtikelsPerOrder]![Aantal]*[Totaal])*[tbl_ArtikelVerwijderdUitZaaglijst]![Aantal] AS DECIMAL)) AS GezaagdeOmzet</code> </p> <p>The syntax might be slightly different for MSAccess, but it will be something like that. Being Access, the default might be int, in which case you might be able to specify Long. Otherwise, specify Decimal. Try to avoid the Real numbers if you can (single, etc.) and they can mess you up if you're not careful.</p> <p>Though less likely, here are some other possible culprits:</p> <ul> <li>Are you sure this query is logically correct? This query can be caused by too large a result set being returned. Use the <code>Select Top 1000 etc.</code> syntax, and analyze the results to make sure your joins are working as you wish, and aren't mistakenly causing <a href="http://en.wikipedia.org/wiki/Cartesian_product" rel="nofollow noreferrer">cartesian</a> results, for example.</li> <li>If your query is returning legitimate results, then might it be that the legitimate result are too massive? If you really should be getting a billion results, and this is too much, then you'll have to change your whole strategy, or reduce the columns being returned, etc.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload