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.
| Author |
Topic |
|
dogli
Starting Member
32 Posts |
Posted - 2002-10-15 : 13:02:31
|
| Hi guys,I use a DTS package to query some tables in a remote Oracle server and put the results in a SQL Server table,tableA, and this package is to set up to run every day to get new data and update old data. What I do now is to delete all data from tableA first, and then fill it with new query data.My question here is that the Remote Oracle Server may be down sometimes, and my query results is empty, so tableA is empty too.(because I delete the data first). I want add a another table,tableB, and I use ActiveX script to test whether tableA is empty. If not empty, I copy all the data from tableA to TableB using recordset. Otherwise, I will not do the copy. In this way, I can keep the tableB, my final table, has data all the time.But I am concerning the performace of this design. The query results ususally contain more than 25,000 records and in growing up. How do you guys think about this? Or do you have any other good ideas?I am thinking there must some smart ways to do this, but just do not know. Please help!Thanks for all of your kind help. |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-15 : 15:44:53
|
| You could rename the tables or have a view pointing to the active one and change that.Or the view could beselect *from tblawhere (select ActiveTbl from SwitchTbl) = 'a'unionselect *from tblbwhere (select ActiveTbl from SwitchTbl) = 'b'Be careful about this though with respect to performance and that you don't end up with illegal instructions due to the union (can't think of any offhand but..).==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|