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.
| Author |
Topic |
|
samrat
Yak Posting Veteran
94 Posts |
Posted - 2002-03-08 : 20:17:53
|
G'dday All,I have a table called Advisor which has [Advisor Key] as its primary key. It is an identity field and its set to NOT FOR REPLICATION. Now, when i try to do a merge replication on this table with Identity Range property True. It gives me ERROR 156: Incorrect Syntax near keyword 'Key'. Now when i remove the space between my primary key ie make it AdvisorKey rather then [Advisor Key] everything works fine.. Using the second option of removing the space from the primary key means lotz and lotz of code changes in my UI. So doesn anyone know how to get around this problem. I am running SQL Server 2000 with SP2.Any help would be appreciated .. RegardsSamratEdited by - samrat on 03/08/2002 22:42:47 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-03-09 : 14:15:10
|
| You could change the table name and provide a view with the old name for the UI until you get round to fixing it.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
samrat
Yak Posting Veteran
94 Posts |
Posted - 2002-03-09 : 19:54:14
|
| Thanx NR !!The fix sounds good to me..Just out of curiosity.. is this a bug in sql server ?? or something i am not doing correctly??and when we make a view are there any performance issues related to it?? Thanking once again,Samrat |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-03-10 : 07:02:56
|
| Sounds like a bug - but I don't use replication or have spaces in identifiers.When you use a view the query plan is generated incorporating the view so it should end up the same as if the underlying tables are accessed directly - but it's not always the case.The generation of the query plan will probably take slightly longer.==========================================Cursors are useful if you don't know sql.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|