Complex Expression (CTE) equivalence in SQLServer 2000

  • I've heard that CTE's can help break up a complex SELECT statement into something more manageable.  How is this accomplished in Sql Server 2000?  Right now I have one view that works fine and then I call that view from within another view.  This doesn't seem very efficient, is there a better way?

    vwOne: "SELECT blah blah FROM myTable"

    vwTwo: "SELECT blah FROM vwOne"

    Thoughts?

  • CTE = Common Table Expression.

    There is no equivalent functionality in SQL 2000. If you post the actual view statements, maybe we can help.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • It's not uncommon that a view works fine, but when you stack views on top of each other, you may get poorer performance than when using those views separately.

    It's one of those things 'how things work'.

    It all depends on what the particular view look like...

    /Kenneth

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

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