Share via

Why isn't SQL Server returning all table records?

Ray 0 Reputation points
2023-08-03T14:27:51.9866667+00:00

Hi MS Q & A

I'm running SQL 2019 on my production environment under a CMS.

When I load my users' records through the content management system I can see/retrieve all records; old and new. Even the ones created right now as expected. However, when I try to pull this same data via the SQL Query window, it does not pull anything past March 2022. In other words, I can't see the recent entries as I do via the CMS.

I ran multiple db checks to no avail.

Why is this happening?

Your prompt response is really appreciated!

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Olaf Helper 47,621 Reputation points
    2023-08-04T06:05:32.9233333+00:00

    Why is this happening?

    Not possible to guess.

    Connect to a wrong (test) server or a wrong (test) database?

    Was this answer helpful?

    0 comments No comments

  2. Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator
    2023-08-03T21:17:32.7133333+00:00

    I am sorry, but it is very difficult to assist with the information you have shared. We don't anything about your database. We don't know anything about your query.

    There could be all sorts of reasons. As Viorel suggests, maybe you are getting all the rows, but you don't have an ORDER BY clause and jump to conclusion.

    Or maybe the CMS is pulling your legs and have more than one table, and you are only querying a subset etc.

    In fact, it may be better to find a forum devoted to the CMS, since people in such a forum is more likely to know the schema of the CMS than we are here.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.