Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to keep tables updated that are imported from

Author  Topic 

imranabdulaziz
Yak Posting Veteran

83 Posts

Posted - 2007-04-09 : 23:40:39
Dear All,

I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2000 as a back End.

Actually I am fetching data from other database(named as retailexcel but in same server). I have wriiten a view (in retailexcel database) to get required data from four table of other database. My problem is when I fetch those data(about 40000 to 50000 record) It taking to much time. I tried catch feature of asp.net2.0. Time reduced but not significantly. So I am trying to import those tables to my database (named Inventory) from that retailexcel.

Now problem is every day or two, record of those tables changes. How can I keep update my tables (which are importing from retailexcel)


Please suggest me some idea.

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-04-09 : 23:45:32

You can use stored procedure to do this and schedule it nightly.

In your stored procedure, basically you perform
- INSERT INTO table where NOT EXISTS
- UPDATE table where there are changes

If you have a last change datetime column in the table in retailexcel database, that it will be better. You can just filter by the last change date.


KH

Go to Top of Page
   

- Advertisement -