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 |
dougancil
Posting Yak Master
217 Posts |
Posted - 2011-07-21 : 12:14:55
|
I have the following query that I'm using as a stored procedure:insert into msbtotal.dbo.newclientsSELECT tcms_members.dbo.memberdata2.* FROM tcms_members.dbo.memberdata2 left outer join msbtotal.dbo.memberdata on tcms_members.dbo.memberdata2.id = msbtotal.dbo.memberdata.id where msbtotal.dbo.memberdata.id isnulland what is supposed to happen is that any new entries in one database is supposed to show up when I run this query. I'm not seeing new entries inserted into the newclients database. I've ran a Select * query from the memberdata where the Last_Date_Updated field showed anything since May of this year and I see results, but my query isn't finding those. Can anyone tell me why this doesnt work?Thank youDoug |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-21 : 12:25:39
|
are you sure the ids returned for the select from memberdata does not exist in msbtotal memberdata table?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
dougancil
Posting Yak Master
217 Posts |
Posted - 2011-07-21 : 12:56:48
|
Visakh,I'll have to verify that. This is part of a job thats done daily from an import of another database. I'll have to let it run tonight and I'll be able to tell you tomorrow. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-21 : 12:58:30
|
ok..only if this doesnt exist in msbtotal you will get output from above statement------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
dougancil
Posting Yak Master
217 Posts |
Posted - 2011-07-22 : 11:09:36
|
I ran my query again this morning and did find one new entry (since this is ran every night from a datadump from another organization.) I'm going to attempt to do this again on Monday to see if it produces any new results. I think that my process may have been backwards (I was copying the data before I was running the query therefore not able to find any new clients because both of my databases had the same information.) I'll update this on Monday. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-22 : 11:35:27
|
ok. no problems. let us know how you got on.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|