.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Full match of two tables

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :Sql Server
There are 2 tables A and B which have the same structure but different data. is there any high efficient method to find all the different rows in A and B except matching all the columns?Michael

View Complete Post

More Related Resource Links

Merge Join: Full Outer Join - keep key values in case of no-match

I'm using the Merge Join to join several different incoming flows into one flow.  I've configured the joins to use a Full Outer Join because I need all records from all sources. In the case of a no-match, I want the component to keep the values of join key fields instead of setting them to NULL.  How can I achieve that?  (Activating the checkbox doesn't help, because that adds a new field to the output instead of re-using the existing one.)

Does a Maintenance Plan "Rebuild Index" task on Tables + Views rebuild the full text indexes ?


As subject really.

I'm talking about a complete rebuild - not an incremental, or a re-organise.

SQL 2005

The full text indexes are only on individual tables, not Views.

I've asked a similar question before, but sufficiently different, and other is marked as Answered so thought I'd open a new Q : http://social.msdn.microsoft.com/Forums/en/sqltools/thread/5f17f4f1-fba9-436f-aedf-cfbfd89c8db2)


Lookup Transformation: Fails to match in full cache mode both fields same case and collation


Hi All

I am at wits end trying to resolve a lookup transformation issue where lookups fail to match in full cache mode. 


1. BIDS 2008

2. Both tables are in the same db with the same collation (Latin1_General_CI_AI)

3. Both columns have the same collation (Latin1_General_CI_AI)

4. Both values are the same case

5. Both columns are varchar(9)

I'm not sure what else there is to check. I would prefer to understand what is causing the lookups to fail vs using partial cache.

Any suggestions welcome!


Need help with mis-match full outer join


Hi, I'm sql 2005.  I have a sp that has 3 parts.  1st part selects from database A into a #tempA, 2nd part selects into a #tempB.  These 2 tables have the 6 common fields and only one field that is different so each table has 7 columns.
Part 3 of this sp full out join these 2 temp tables on the first 4 common fields and only include row if either  col5 and col6 subtraction difference is not equal to 0(meaning they should have the same value for both table of col5 and col6).  Select these rows into a 3rd temp table. then return the results of it.
The problem I have now is my 3rd table would record rows that should be a match but because of select order from each table ends uip with mis-matched the rows.
OR (A.COL6-B.COL6)<> 0


  col1        col2        col3        col4        col5        col6

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Temporary Tables - MS SQL Server

Usage of temporary tables in MS SQL Server is more developer friendly and they are widely used in development. Local temporary tables are visible only in current session while global temporary tables are visible across all sessions.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

PDA Keyboard v1.0 Light Edition - Full Screen Keyboard

The default keypad on Windows Mobile is not at all finger friendly, there is no way you can use it with your fingers. I have trouble using the stylus with it too. But there are many freeware option available to make the SIP ( Software Input Panel - check the Glossary ) finger friendly. Some of these are HTC Diamond keyboard, Blimkeys, PocketCM Keyboard and then now we have PDA Keyboard v1.0 Light Edition from pdamedia.biz. When you hit the blue button it goes into fullscreen mode , then you can use both your hands for typing.

The number of members in the conceptual type ... does not match with the number of members on the ob



I've added a scalar property to an entity and now ASP.NET Dynamic Data scaffolding throws this error:

The number of members in the conceptual type 'TrainingModel.Users' does not match with the number of members on the object side type 'TrainingModel.Users'. Make sure the number of members are the same.

This happens at the following line in global.asax:
model.RegisterContext(typeof(TrainingModel.TrainingEntities), new ContextConfiguration() { ScaffoldAllTables = true });

Please help!

Is this load full or matching one only... coz of need to know performance



This my Two Table i have one doubt...

For my first table i have select Top 2 from Employee_info 

and second table itz just selct * from MDEp..

What my doubt is on loading the above report?

Is this load all the record from MDep or just matching one based on Employee_info..?

Using a trigger or anything else to populate two tables


Hi! I'm creating an application that's supposed to first add a record to table1, and then get the ID from that record to use when adding a record to table2, to be able to associate these two records with eachother.

The user gets to type in some values that goes to table1, and some values that goes to table2, but before the insert statement for table2 is executed i need the ID from the recently added record in table1. Some dude told me to use a trigger for the autopopulate purpose, but does that really work when i also need to save some values that's user input, and when those values doesn't get saved in table1?

Are there any other way to do this or can i send values to a trigger? I'm new to triggers and stored procedures, i don't have any particular knowledge of this, any help is appreciated!


Regards, Monsterbadboll

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

SqlDataSource UpdateCommand using 2 tables


I have two tables

Trans  with fields TransID, Date, CustomerID and some other stuff

Customer with fields CustomerID, Name, TaxId

On the screen the user only sees the fields Date and Customer Name. CustomerID is behind the scenes only.


I'm using SqlDataSource. Having no problems with SelectCommand. I don't know how to construct the UpdateCommand and InsertCommand.

Let's say the user changes the date, then I need to do an UPDATE.

UPDATE Trans SET Date = @Date, CustomerID = @CustomerID results in an error message and the record is not updated.

I get an error on the page that says "Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in correct format".


I tried taking out the set for CustomerID and I still get the error on page.


Also, for inserting, the users will see a dropdownlist with Customer Names. I need to convert that to a CustomerID to be used in the new record being inserted in the database. I'm not sure how to do this.


Do I need to do something with Control Parameters?

How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

Advanced Basics: A Match-Making Game in Visual Basic


My four-year-old son has decided that he wants to be like his dad when he grows up. He is planning to work in my office, and write computer programs just like I do. But there is one problem-he thinks I write games.

Duncan Mackenzie

MSDN Magazine October 2005

Data Points: Creating Audit Tables, Invoking COM Objects, and More


Dealing with error handling between T-SQL and a calling application, evaluating when a field's value has changed, and creating auditing tables in SQL ServerT are all common issues that developers must tackle.

John Papa

MSDN Magazine April 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend