Hi there.
We have just purchased a new server, which I am trying to set up
replication to.
I have no problems until I hit one database.
I am having trouble when it hits the following SP
CREATE PROCEDURE sp_pull_data_1
-- Get list of renewals for a date 'days' in the future
-- Date: 12 February 2002
@.days SMALLINT = 16
AS
DECLARE
@.comp_date VARCHAR(12)
SELECT
@.comp_date = CONVERT(VARCHAR, DATEADD(dy, @.days, GETDATE()), 103)
IF EXISTS (SELECT * FROM "hs-rts"..sysobjects WHERE id = OBJECT_ID
('tbl_renewal_data'))
DROP TABLE tbl_renewal_data
-- Retrieve the entries
SELECT *
INTO tbl_renewal_data
FROM vwMillhouseRisks
WHERE (Renewal_Date = @.comp_date)
The error message is Line 11: Incorrect syntax near 'hs-rts'.
I realise that it's because SQL has put "" round the DB name, in this case
hs-rts.
Is there any way to fix this problem, so I can run full replication?
John Shaw
Message posted via http://www.sqlmonster.com
replace ''hs-rts'' with [hs-rts]
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"John Shaw via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:2c1695a0b4d148d5ac3f3764b0137b5a@.SQLMonster.c om...
> Hi there.
> We have just purchased a new server, which I am trying to set up
> replication to.
> I have no problems until I hit one database.
> I am having trouble when it hits the following SP
> CREATE PROCEDURE sp_pull_data_1
> -- Get list of renewals for a date 'days' in the future
> -- Date: 12 February 2002
> @.days SMALLINT = 16
> AS
> DECLARE
> @.comp_date VARCHAR(12)
> SELECT
> @.comp_date = CONVERT(VARCHAR, DATEADD(dy, @.days, GETDATE()), 103)
> IF EXISTS (SELECT * FROM "hs-rts"..sysobjects WHERE id = OBJECT_ID
> ('tbl_renewal_data'))
> DROP TABLE tbl_renewal_data
> -- Retrieve the entries
> SELECT *
> INTO tbl_renewal_data
> FROM vwMillhouseRisks
> WHERE (Renewal_Date = @.comp_date)
>
> The error message is Line 11: Incorrect syntax near 'hs-rts'.
> I realise that it's because SQL has put "" round the DB name, in this case
> hs-rts.
> Is there any way to fix this problem, so I can run full replication?
> John Shaw
> --
> Message posted via http://www.sqlmonster.com
Wednesday, March 21, 2012
Replication Problems
Labels:
database,
hit,
microsoft,
mysql,
oracle,
purchased,
replication,
server,
sql,
upreplication
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment