Rotating Header Image

Posts Tagged ‘view’

MAXRECURSION with a CTE in a View

So a minor “gotcha” here to start your day. If you’ve worked with CTEs before you’ve probably also worked with the MAXRECURSION option which specifies how many recursion levels deep to go before cancelling a statement. (Code below borrowed from: http://msdn.microsoft.com/en-us/library/ms175972.aspx) USE AdventureWorks; GO –Creates an infinite loop WITH cte (EmployeeID, ManagerID, Title) as ( [...]

sp_refreshview How Did I Forget You?

So a developer asked me a question about how he added a column to a table and now the view that referenced the table wasn’t showing the column.  I asked the obvious question: “Did you add the column to the view?” to which he replied “The view is doing a SELECT *” OK it may [...]

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.