Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai ALL

I have a table with the following structure
table name
Fields are:

software_id primaryKey
version_id FK
software_name is varchar

I have stored detials in the table

I need to compare two versions

select software_name from software where version =1

select software_name from software where version =2

These two queries should give the

sofware that is not in verion 1
Sofware that is was not in version 1
Posted
Updated 30-Jun-11 19:27pm
v2
Comments
Sandeep Mewara 30-Jun-11 13:15pm    
It's not that difficult. did you try? BTW, you have not mentioned about any existence of Primary Key. If it is there, it would be very simple. Try "NOT IN"
Vivek Krishnamurthy 30-Jun-11 13:25pm    
from your example, is there any similarities between tableA and tableB ?
and what is the nature of similarities ? do they have common columns ?
theanil 30-Jun-11 14:01pm    
(A OR B)-(A AND B)

1 solution

You can use on of the datacompare tools if you are comparing complex schemas
http://www.devart.com/dbforge/sql/datacompare/[^]

http://www.starinix.com/sqlcompare01.htm[^]

There are tons of other tools, if you are trying to solve a complex comparision.

otherwise, you can simply load data into datasets and compare them using code. Its much easy to do so.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900