| Author |
Topic |
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-03-25 : 10:40:19
|
| HI All,i am completely stuck on this.I have a daily table created and i want to compare it with the previous one. If any records added or removed ..this should be thrown to a 3rd table.Is this possible and how..Any suggestion will be greatly appreciated.thanks |
|
|
heavymind
Posting Yak Master
115 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-25 : 12:46:28
|
quote: Originally posted by korssane HI All,i am completely stuck on this.I have a daily table created and i want to compare it with the previous one. If any records added or removed ..this should be thrown to a 3rd table.Is this possible and how..Any suggestion will be greatly appreciated.thanks
does your daily table have audit column like datecreated,datemodified etc? |
 |
|
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-03-25 : 13:54:08
|
| Hi all,thanks for your quick replies.Yes the table has the 1st raw :01 20090325030201 1 that includes the date. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-25 : 14:04:40
|
quote: Originally posted by korssane Hi all,thanks for your quick replies.Yes the table has the 1st raw :01 20090325030201 1 that includes the date.
then what you can do is to compare date value of this table to previous days table date value to capture the records that got changed since last day and then put it into third table. |
 |
|
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-03-25 : 14:47:29
|
| thanks Visakh,therer is not field called dat & time. the only information regarding the date is the file header.is it possible to help me coding this ?thanks |
 |
|
|
ashishashish
Constraint Violating Yak Guru
408 Posts |
Posted - 2009-03-26 : 08:35:30
|
| u can also use EXCEPT statement if u r working in SQL server 2005.. to get the difference of the tables....if the structure of both tables are same?Thanks... |
 |
|
|
korssane
Posting Yak Master
104 Posts |
Posted - 2009-03-26 : 11:05:37
|
| thanks for the tips. i wil try this and get back to you. |
 |
|
|
Itamar
Starting Member
19 Posts |
Posted - 2009-03-26 : 11:30:51
|
quote: Originally posted by korssane HI All,i am completely stuck on this.I have a daily table created and i want to compare it with the previous one. If any records added or removed ..this should be thrown to a 3rd table.Is this possible and how..Any suggestion will be greatly appreciated.thanks
hi there,if this is sometihng you wanna do every now and then -you cab use the profiler. [url]http://nobhillsoft.com/Freebies.aspx[/url]if you want a programmatic solution, try something like: [url]http://www.sqlpass.org/Default.aspx?TabId=78&articleType=ArticleView&articleId=13[/url]Nob Hill Software - Tools for Database PeopleSQL Version Control, Database Compare, Query Tools and more. www.nobhillsoft.com |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-28 : 03:58:27
|
quote: Originally posted by korssane thanks Visakh,therer is not field called dat & time. the only information regarding the date is the file header.is it possible to help me coding this ?thanks
you can then extract date value from header and use it for the comparison |
 |
|
|
|