Ask Paula!

...bringing you notes from the field...
posts - 55, comments - 17, trackbacks - 0

My Links

News

Article Categories

Archives

Post Categories

.NET Development

Enterprise Integration

Java Development

Mobile/PDA Development

Professional Affiliations

Why does "use db" with a hyphen throw "Incorrect syntax near '-'" ?

I think this SQL Server x.x  oddity goes back to the old Sybase 4 days!

If you want to use a database name that's been dubbed something like 'paula-objects' and type out:

use paula-objects

then execute the request, you'll get the error message:  Incorrect syntax near '-'

just type this instead:

use [paula-objects]

when you execute the request, the syntax error will clear up!

Print | posted on Thursday, July 31, 2008 9:26 AM | Filed Under [ SQL ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: