Query Results Change every three runs

  • I've got a view and when I write a simple select query from this view joined on a second view, i noticed that my results are changing. Sometimes the data is complete and all columns are populated and sometimes I get a NULL result on one of the columns. What's going on? Why aren't my results consistent? Any tips?

  • If no one else changes the data while you ran your queries, you may check if the data is corrupted.

  • Are you sure in both instances you used the same 2 views in your query?  I know that sometimes a typo on my part can make alot of difference in the results. 

    Another thing might be that you ran the query against 2 different databases (i.e.  production vs. development).

     


    Have a good day,

    Norene Malaney

  • Can you post some code?

    The ideas above are what I thought of. Data should be consistent and usually corruption results in pages being skipped missing data.

  • Do you have any NOLOCK hints in the views ?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply