Saturday, July 4, 2009

Error While Executing PIVOT Operator.

Is sql when we Use Pivot Operation Some times It Fires Incorrect syntax near '('.
This Exception Is Due to law Compatibility level. to resolve this error Just set compatibility level to higher than current level.

we can get status of compatibility level using stored procedure sp_dbcmptlevel.
to get current level : sp_dbcmptlevel @dbname ='DatabaseName'
to set new level: sp_dbcmptlevel @dbname ='DatabaseName', @new_cmptlevel = 80

No comments:

Post a Comment

Comments posted on ASP.Net Ajax Tutorials Blog are moderated and will be approved only if they are on-topic and not abusive. Please email me or my team for tech-support or blogging related questions. Avoid including website URLs in your comments - Thanks Author