I have the following query:
And what I'm trying to do is to compare two databases on the same server to see if any new data is entered into tcms_members.db o.memberdata compared to msbtotal.dbo.me mberdata and if so, the new data is written to a table (in the msbtotal database) called "newclients ." The data is checked via the ID field and if there is any new data in the tcms_members.db o.memberdata, it will be evident by there being a new ID number. The query runs fine and I tried adding "sample" data into the database to have it inserted into the new client table and that sample data wasnt added BUT I also didn't receive any errors. I can provide the sample data if necessary but I was wondering if anyone can see anything wrong with my query that may cause this? The server is a SQL 2000 server and I am running the query as the admin on the server, just as an fyi.
Thank you
Doug
Code:
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO ALTER PROCEDURE YourProcedure AS insert into msbtotal.dbo.newclients SELECT tcms_members.dbo.memberdata.* FROM tcms_members.dbo.memberdata left outer join msbtotal.dbo.memberdata on tcms_members.dbo.memberdata.id = msbtotal.dbo.memberdata.id where msbtotal.dbo.memberdata.id is null GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
Thank you
Doug
Comment