Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Select Statement

Author  Topic 

toylar
Starting Member

2 Posts

Posted - 2008-07-16 : 17:46:29
Why doesn't sql like my statement

SELECT * FROM 2008E-05-1002.dbo.X_PERSON

I know that it has to do with my database name...but how do I get it to like it?

Error that I'm getting is:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '2008E-05'.

Thanks

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2008-07-16 : 17:52:54
Try delimiting your database name like: SELECT * FROM [2008E-05-1002].dbo.X_PERSON

EDIT: You should search BOL for Identifiers. Specifically, Rules for Regular Identifiers. Your database name breaks the rules for TSQL naming.
Go to Top of Page

toylar
Starting Member

2 Posts

Posted - 2008-07-16 : 18:08:35
duh that worked
Go to Top of Page
   

- Advertisement -