April 14, 2010 at 3:53 pm
Hi!
thereΒ΄s a sql server named 'srv-dev'.
IΒ΄ve to update certain tables in 'srv-dev' from my server but sql says that ther is a syntax error near '-'
what can I do??
thanks in advance.
April 14, 2010 at 3:58 pm
Most probably you want to shows us the full statement as well as the full error, don't you? π
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.April 14, 2010 at 4:01 pm
place [] around the server name.
Avoid names like this in the first place π
---------------------------------------------------------------------
April 14, 2010 at 4:02 pm
PaulB-TheOneAndOnly (4/14/2010)
Most probably you want to shows us the full statement as well as the full error, don't you? π
statement
INSERT INTO srv-dev.labmger.dbo.analysis
SELECT *
FROM hades.labmger.dbo.analysis
error
Mens. 102, Level 15, State 1, Line 1
Incorrect syntax near '-'.
thanks!
April 14, 2010 at 4:05 pm
posts crossed [-] see above
---------------------------------------------------------------------
April 14, 2010 at 4:07 pm
solved thanks!
April 20, 2010 at 4:57 pm
Though the brackets will correct that issue, I recommend not including special characters in server or database names (_ - etc)
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 21, 2010 at 11:01 am
whats wrong with etc in a server or database name?
π
---------------------------------------------------------------------
April 21, 2010 at 11:04 am
george sibbald (4/21/2010)
whats wrong with etc in a server or database name?π
Thanks George. LOL
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
April 22, 2010 at 9:49 am
CirquedeSQLeil (4/20/2010)
Though the brackets will correct that issue, I recommend not including special characters in server or database names (_ - etc)
... or in table names, column names, procedure names etc. π
April 22, 2010 at 11:08 am
nigel. (4/22/2010)
CirquedeSQLeil (4/20/2010)
Though the brackets will correct that issue, I recommend not including special characters in server or database names (_ - etc)... or in table names, column names, procedure names etc. π
Agreed - keeping them out of procedure names is such a hard thing to do when Microsoft does it that way. Then again, MS uses them by default in DBNames too (that is easier to curb though due to a lower frequency).
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply