autoexcrement (4/23/2013)
Thanks for the continued replies!This database is hosted at a web hosting company on SQL 2K5. Maybe their box doesn't have all the necessary hotfixes installed or something, because I am able to reproduce this error over and over, including with the exact code shown above. 🙁 I think I'll contact the host, since you have shown that this shouldn't be a problem.
And thanks also for the "WITH" tip! 🙂
I do however have a 2005 box. I just added the function, then the table. All is well. Once I added the constraint to the table I was unable to open it in the designer.
My version:
Microsoft SQL Server 2005 - 9.00.4035.00 (X64) Nov 24 2008 16:17:31 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7600: )
I would suggest you don't use the designer anyway. When you modify tables it can do some pretty nasty things sometimes. It isn't likely to corrupt anything but sometimes a simple change in the GUI can take a LONG time when just doing it in t-sql takes milliseconds.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/