LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  DB Query - Record count issue

    Employee
    Posted 02-24-2017 10:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: islandz

    When I run SQL queries, using the DB Query node, the resulting record count is inconsistent with the results I get if I run the same query through SQL Management Studio. If I rerun the node (with no changes), I end up getting the correct record count. How do I ensure that I get the correct query result the first time I run the node?

    Thank you


  • 2.  RE: DB Query - Record count issue

    Employee
    Posted 02-24-2017 13:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    How many records are missing? Just a few, or a significant number like 50%?
    Are records being added to the table in the database?
    Are you sure that both are querying the same database (like development vs production)?


  • 3.  RE: DB Query - Record count issue

    Employee
    Posted 03-02-2017 13:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: islandz

    It ranges from 2/3% to about 10/12% missing.
    No, the tables are not being updated at the time that the queries are being run. As a test, I have run a query in Mgmt Studio, copied it to LS and run it, then reran it in Mgmt Studio. I get the same record count in both runs of Mgmt Studio, but a different count in LS. Then if I refresh the DB node, the correct count of records seem to com in.
    Both Mgmt Studio and LS are hitting the same database for the query.