Knives85 (9/23/2013)
There an issue around the If. I get the error, expecting ID?
Your ELSE is dangling.
__________________________________________________________________________________________________________
How to Post to get the most: http://www.sqlservercentral.com/articles/Best+Practices/61537/