SQL: comparing rows and give the change

20 pts.
Tags:
SQL
SQL Query
saving greetings to everyone! i m receiving a dump data at day 1, inserting all that data into a database. this database has about 30 above tables, each and every table has about 100 above rows. every table has a column name cell id. on 2nd day i again receive the dump which also has to be inserted into the same database... into their respective tables.. now in any particular table, i have to compare the row of cell id=1 of dump day 1 with the row of cell id=1 of dump day 2.. since the cell ids of any dump could not change, but other fields might be change. so i have to detect this change in other fields of the respective cell id. if my table is like this, carrying the data of 1st and 2nd day both |date | cell_id | a | b | c | | | | | | | |24/6 | 1 | 5 | 3 | 8 | | | | | | | |24/6 | 2 | 4 | 5 | 6 | | | | | | | |25/6 | 1 | 5 | 6 |9 | | | | | | | |25/6 | 2 | 4 | 5 | 6 | i want the result like this ---> |date |cell_id| b | c | | | | | | |24/6 | 1 | 3 | 8 | | | | | | |25/6 | 1 | 6 | 9 | i.e only those columns which got change with their respective cell id and date. column 'a' didnt come in result because it was same through out please help me out for generating query for this..

Answer Wiki

Thanks. We'll let you know when a new response is added.

i want the query generation in sql

————–
you need to ask a better a better question. I have read your question several times and I have no idea what it is you want. dump day 1 & dump day 2? further, it seems as if you want a variable number of columns returned – only the columns whose values have changed. am I understanding this correctly? seems unusual.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following