20 pts.
 SQL: comparing rows and give the change
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..

Software/Hardware used:
ASKED: June 24, 2009  2:06 PM
UPDATED: July 30, 2009  1:58 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  July 30, 2009  1:58 pm  by  K38   20 pts.
All Answer Wiki Contributors:  K38   20 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _