I am using osql (transact sql) for creating a new database in MSDE (Microsoft SQL Server Desktop Engine).
I want to use special characters in the database name: like: MyDb.2003.7
But whenever I use '.' character in database name, it gives an error.
How should I go about creating a database with special charcters in it?
Joined: Mar 02, 2006
Don't. It is not a good idea. Those types of characters in Database names were restricted for a reason. You might be able to get away with this sort of stuff by enclosing the name in quotes (either double or single), at least I know you can in MySQL. But then you must also remember to quote them whenever you use them, and it is advised against. So, as stated earlier, unless there is a very, very, very, compelling reason to do so, don't do it. It only leads to a lot of headaches, and possibly compatability issues as well. [ July 28, 2006: Message edited by: Martin Simons ]