﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administration / Notification Services  / Query Analysis / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 00:57:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>[quote][b]deepika_goyal (10/11/2012)[/b][hr]Hello!!,NO body has replied on thiss.Please give some suggestion.Thanks!![/quote]HelloYou are likely to get a much faster response if you provide DDL for your sample data. Here's your 'master' table, can you do the same with the 'slave' table? Make sure it runs without errors and that the data is correct before you post it. Thanks.[code="sql"]CREATE TABLE #Master ([No] INT, [Type] VARCHAR(20), [Version] VARCHAR(10), [Date] DATE)SET DATEFORMAT DMYINSERT INTO #Master ([No], [Type], [Version], [Date])SELECT 1, 'Sales', 'V1.0', '01/10/2012' UNION ALLSELECT 2, 'Consumption', 'V1.10', '29/10/2012' UNION ALLSELECT 3, 'Daily Needs', 'V1.01', '13/08/2011' UNION ALLSELECT 4, 'Overall', 'V2.01', '01/09/2012'SELECT * FROM #Master[/code]</description><pubDate>Fri, 12 Oct 2012 03:49:10 GMT</pubDate><dc:creator>ChrisM@Work</dc:creator></item><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>Thanks Dave!!:-):-)will go through it.Regards,Deepika</description><pubDate>Fri, 12 Oct 2012 03:40:59 GMT</pubDate><dc:creator>deepika_goyal</dc:creator></item><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>This sounds like a relational division problem,ie some rows, equal rows, more rows...Joe Celko has done a good write up on the subject, [url]http://www.simple-talk.com/sql/t-sql-programming/divided-we-stand-the-sql-of-relational-division/[/url]</description><pubDate>Fri, 12 Oct 2012 02:34:37 GMT</pubDate><dc:creator>Dave Ballantyne</dc:creator></item><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>Thanks Dave for your reply..Still i have to Code, i want to know good approach so that i can start my development.please let me know any way.thanks a lot</description><pubDate>Fri, 12 Oct 2012 00:11:32 GMT</pubDate><dc:creator>deepika_goyal</dc:creator></item><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>IF you show your code for the solution and the execution plan then you may get some suggestions on optimization.</description><pubDate>Fri, 12 Oct 2012 00:06:47 GMT</pubDate><dc:creator>Dave Ballantyne</dc:creator></item><item><title>RE: Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>Hello!!,NO body has replied on thiss.Please give some suggestion.Thanks!!</description><pubDate>Thu, 11 Oct 2012 23:21:06 GMT</pubDate><dc:creator>deepika_goyal</dc:creator></item><item><title>Query Analysis</title><link>http://www.sqlservercentral.com/Forums/Topic1371366-92-1.aspx</link><description>Dear All,Need some Suggestion.I have two tables one is Master and other one is slave.MY master table has some set of Data and slave tables contains data set from many slaves.Here is the sample data                   Master			No.	Type	   Version 	Date1	Sales	       V1.0	01/10/20122	Consumption   V1.10	29/10/20123	Daily Needs     V1.01	13/08/20114	Overall	       V2.01	01/09/2012	                 Slave			Code	No.	Type	     Version 	DateS001	1	Sales	          V1.0	01/10/2012S001	2	Consumption	V1.10	29/10/2012S001	3	Daily Needs	V1.01	13/08/2011S001	4	Overall	             V2.01	01/09/2012S001	5	Electricity	V5.01	18/10/2012S002	1	Sales	             V1.0	 01/10/2012S002	2	Consumption	V1.10	15/10/2012S002	3	Daily Needs	V1.1000	13/08/2011S003	1	Sales	             V1.0	 01/10/2012S003	2	Consumption	V1.10	29/10/2012S003	4	Overall	            V2.01	 01/09/2012S003	3	Daily Needs	V1.01	13/08/2011S003	4	Overall	             V2.01	 01/09/2012S003	5	Electricity	V5.01	18/10/2012Now, i have to compare Master with slave and then Slave with Master.Here are conditions.1. IF my master and slave matches then report says MATCH2. IF my master and slave doesnt matches then report says MISMATCH3. IF my Master contains more data than slave then report says Missing at Slave4. IF my slave contains more data than Master then report says Missing data at Master.i know how to get the data, but i want quickest way as my slave table contains millions of record, i want my process to be very quick.Summarization of test cases.Final Report											Master			Slave		StatusCode	No.	Type	Version	Date		Version	    Date	S001	1					 ALL MatchS002	2  Daily Needs	V1.01	13/08/2011       V1.10013  /08/2011	MismatchS002	3	Daily Needs	V1.01	13/08/2011		V1.1000	13/08/2011	MismatchS002	4	Overall	V2.01	01/09/2012		V5.01	18/10/2012	Missing in SlaveS003	5	Electricity				V5.01	18/10/2012	Missing in Master PLease let me know if anybody have quick way to do it.thanksRegards.Deepika</description><pubDate>Thu, 11 Oct 2012 05:17:12 GMT</pubDate><dc:creator>deepika_goyal</dc:creator></item></channel></rss>