Hello All,
Is the only solution to an update query which requires the records in a
certain order to dump the records into a temp table in the required
order, then do the update query?
I've tried nesting a select query with the proper sort order inside the
update query, but the update query still appears to complete in the
order of the records in the table. I thought that I'd keep it a simple
question without getting into the detail of the 2 solutions that I
already have working on the 360k record table. The issue I'm
specifically dealing with is bloat of the MDB file. The 2 solutions are
as follows:
1 Opening a recordset and moving through it 1 record at a time which
causes severe bloat.
2 Append the data to a temp table in the order required, then do the
update query and move it back to the original table. This requires
deletion of the data twice which causes some bloat, but not as
significant as the first.
I maybe missing something here, so your ideals would be appreciated.
TIA!
--
Regards,
Greg Strong 3 5111
Hello Greg,
I'm not sure why solution 1 would result in any significant bloat. Are
you closing your recordset at the end of your process?
If you have a split front end (application) and back end (database) and
you can easily gain exclusive access to the back end during your
processing, simply compact the back end database programatically when
you're done (look at help for DAO CompactDatabase method ).
If you do end up having to use a temporary table, consider creating a
new temporary database in a separate file with your temp table in it
when you have to do this update process. This can be done either
through code or by having a 'template' database with an empty temp
table in it which you can create copies of. Link to the temp table in
your temp database from the database where your processing is going on.
When you are finished with the temp table simply unlink it and then
delete the entire temp database file.
HTH,
Bruce
Hello Greg,
I'm not sure why solution 1 would result in any significant bloat. Are
you closing your recordset at the end of your process?
If you have a split front end (application) and back end (database) and
you can easily gain exclusive access to the back end during your
processing, simply compact the back end database programatically when
you're done (look at help for DAO CompactDatabase method ).
If you do end up having to use a temporary table, consider creating a
new temporary database in a separate file with your temp table in it
when you have to do this update process. This can be done either
through code or by having a 'template' database with an empty temp
table in it which you can create copies of. Link to the temp table in
your temp database from the database where your processing is going on.
When you are finished with the temp table simply unlink it and then
delete the entire temp database file.
HTH,
Bruce
On 14 Oct 2005 14:34:11 -0700, br***@aristotle.net wrote: I'm not sure why solution 1 would result in any significant bloat.
Maybe it has something to do with the fact that the DB actually is
creating data with the random number generator. I'm starting with a
little and ending up with a lot. Given this and the fact that Access has
to have some way to 'go back' before committing a transaction may be
what is causing the bloat. I'm just thinking out loud here.
Are you closing your recordset at the end of your process?
Yes.
If you have a split front end (application) and back end (database) and you can easily gain exclusive access to the back end during your processing, simply compact the back end database programatically when you're done (look at help for DAO CompactDatabase method ).
I've compacted the DB via code.
If you do end up having to use a temporary table, consider creating a new temporary database in a separate file with your temp table in it when you have to do this update process. This can be done either through code or by having a 'template' database with an empty temp table in it which you can create copies of. Link to the temp table in your temp database from the database where your processing is going on. When you are finished with the temp table simply unlink it and then delete the entire temp database file.
Thanks for the ideal.
--
Regards,
Greg Strong This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Yannick Turgeon |
last post by:
Hello,
I'm using SS2000 on NT4.
If I run the following query, is it garanteed that the field
"OldField1Value" will hold the value Field1 had before the query was run?
UPDATE MyTable
SET...
|
by: Sri |
last post by:
I am writing a download process in which i have a condition where i
need to join four tables. Each table have lot of data say around
300000 recs.
my question is when i am doing the joins on...
|
by: Bill |
last post by:
I'm trying to create a wizardlike interface using a couple listboxes. I
know you've seen it before. You double click on an item in one listbox and
it "moves" it to the other. I used to approach...
|
by: Gregg |
last post by:
I am trying to pass the maximum order number from a table
of orders into one record only in another table. I created
an update query and created the following:
Field: next_fpo_no
Table:...
|
by: Paramveer.Singh |
last post by:
Hi all!
consider the following table
table a (id int primary key)
and a particular instance of it:
id
------------------------
5
6
|
by: Beowulf |
last post by:
I have the view below and if I use vwRouteReference as the rowsource
for a combo box in an MS Access form or run "SELECT * FROM
vwRouteReference" in SQL Query Analyzer, the rows don't come through...
|
by: pb648174 |
last post by:
I have the following basic statements being executed:
Create a temp table, #TempPaging
Insert Into #TempPaging (Col1, Col2)
Select Col1, Col2 From SomeOtherTable Order By Col2, Col1
Select...
|
by: =?Utf-8?B?VmFuZXNzYQ==?= |
last post by:
Here is my loop and it runs fine:
----------------------------------------------------
sSQL = "SELECT * FROM STORE_ITEMS"
Set DataRec = DB.execute(sSQL)
if not DataRec.EOF then
do while not...
|
by: bilibytes |
last post by:
Hello,
I am trying to make a query with some sub queries, and i am having some syntax errors.
I have a table with the active users:
which contains: id(auto_increment) | user_name | now_active...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |