Views (only) return no data

  • Hi,

    We just had an old SQL 2000 server moved to our offices.

    When we try and run a SP they had written it doesn't return any data.

    So, I tracked it down to the views it is referencing.

    It looks like all the tables return records...BUT no view I select returns records. Doesn't matter which view it is...it won't return any records.

    Again, we just stood up this server. It was working in the other location.

    Tables work - views don't

  • Check the definition of the views. What filters are on the selects?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • It's not that it's returning zero records..it's that when opening a view it just spins and spins eventually timing out. but only on views

    There are about 30 views. That all reference other views.

    If I go any of the tables, I can pull records.

    If I try and open any of the 30 views..I can't

    So, I was thinking there had to be some global view issue?

  • Look at the definition of the views (sp_helptext). Check the queries, what do they do?

    Have you updated statistics since upgrading? Have you rebuilt indexes since upgrading.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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