I am working on sql 2005 on server 2003. I am trying to create transactional replication but its failing. I am just doing simple replication on two databases on the same server but i am getting this msg.

I am using the same database on another machine with SQL 2000 and the replication works fine. I have tried to use replication one two different machines and both have the same problem.

i dont know what the isssue is, is it a bug? or is that some kind of a permission issue. However , I did check the syntax it gives the error on.,.. and its invalid but this is the piece of code that the SQL 2005 generates its self so im even more confused.



Can someone please help.




Command attempted:
create procedure "sp_MSins_dboAvailableContracts_msrepl_ccs"
@c1 numeric(18,0),@c2 numeric(18,0),@c3 varchar(20),@c4 char(1)
as
begin
if exists ( select * from "dbo"."AvailableContracts"
where "FID" = @c2 and "AvailableMonth" = @c3 and "PromptMonth" = @c4
)
begin
update "dbo"."AvailableContracts" set
where "FID" = @c2 and "AvailableMonth" = @c3 and "PromptMonth" = @c4
end
else
begin
insert into "dbo"."AvailableContracts"(
"UCID"
,"FID"
,"AvailableMonth"
,"PromptMonth"
)
values (
(Transaction sequence number: 0x00000024000000ED00AA00000000, Command ID: 57)

Error messages:
Incorrect syntax near the keyword 'where'. (Source: MSSQLServer, Error number: 156)
Get help: http://help/156
Incorrect syntax near the keyword 'where'. (Source: MSSQLServer, Error number: 156)
Get help: http://help/156