June 8, 2004 at 9:49 am
Try this.
1) Union the two tables together (If they have exactly the same formats... see NOTE: below)
SELECT * INTO ##Compare FROM Task UNION SELECT * FROM Tracker..Task
2) See if there are any Task IDs with different values along the row
SELECT TaskID, COUNT(*) FROM ##Compare GROUP BY TaskID HAVING COUNT(*) > 1
Now you can actually pull up any TaskID and see the rows right next to one another for easy identification, if necessary.
SELECT * FROM ##Compare WHERE TaskID IN (SELECT TASKID FROM ##Compare GROUP BY TaskID HAVING COUNT(*) > 1) ORDER BY TaskID
3) Now see if any of the task ID in the ##Compare Table don't exist in the original tables.
NOTE:
Make any adjustments to the code as necessary to handle inconsistencies in data formats.
June 8, 2004 at 10:06 am
That was a really nice technique Scott
Unite And Conquer !
/rockmoose
You must unlearn what You have learnt
June 8, 2004 at 12:50 pm
Sometimes it's more important to get the job done that to find the snazziest way to do it. Brute force works... most of the time... and in a lot of cases it's faster than learning something new. Then again we all know if we don't continually learn new things we'll be out of jobs in 3-5 years.
Thanks for the compliment.
Scott M. Rankin
Database Administrator
Coolsavings, Inc
360 North Michigan Ave.
Suite 1900
Chicago, IL <st1ostalCode>60601</st1ostalCode>
June 8, 2004 at 2:47 pm
Thank u very much all of u guys.
U r very helpful
I got fair idea what to do now.
Viewing 4 posts - 16 through 18 (of 18 total)
You must be logged in to reply to this topic. Login to reply