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
 General SQL Server Forums
 New to SQL Server Programming
 db name in front not working

Author  Topic 

lamujerdetuhermano10
Yak Posting Veteran

75 Posts

Posted - 2008-08-27 : 19:32:06
how do u write a select statement using the db name on sql server 2005? looks like its not working

select * from hardware_I18_SVO_25AUG08.client.client where clientid ='12'

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-08-27 : 19:39:14
probably this:

select * from hardware_I18_SVO_25AUG08.dbo.client where clientid ='12'


elsasoft.org
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-08-27 : 20:52:09
quote:
Originally posted by jezemine

probably this:

select * from [hardware_I18_SVO_25AUG08].dbo.client where clientid ='12'


elsasoft.org

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-27 : 21:13:15
sodeep,

Why would square brackets be needed for that case? Underscores don't have a problem but dashes do.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -