Archive only a selection from a table

  • Thread starter Thread starter dietmarhannam
  • Start date Start date
D

dietmarhannam

I have a table within Access storing data. Most records also have an
attachment (.doc/.wav etc). Because some of these files can be large, i
would like to run a query (or module) that will select the Primary Key
(ID) and the attachment and send them to a specified location for
future reference. I would then like the attachment deleted from the
original table to help improve performance.

I don't even know if this is possible, but this is the place to ask (i
hope!)

Thanks,

Dietmar
 
I have a table within Access storing data. Most records also have an
attachment (.doc/.wav etc). Because some of these files can be large, i
would like to run a query (or module) that will select the Primary Key
(ID) and the attachment and send them to a specified location for
future reference. I would then like the attachment deleted from the
original table to help improve performance.

I don't even know if this is possible, but this is the place to ask (i
hope!)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't know what you mean by an "attachment" to a table. Do you mean
you have an ID column and a binary object column (image, document, wav
file) as part of the record? If so, you can transfer the data to
another table (the archive table) by a command like this:

INSERT INTO ArchiveTable (ID, binary_object_column)
SELECT ID, binary_object_column
FROM SourceTable
WHERE ID = XXX

After you transfer the data to the archive you can delete the old record
like this:

DELETE * FROM SourceTable WHERE ID = XXX

Substitute your table/column names for the names I used. Use the ID
number in place of the "XXX."

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRKGNC4echKqOuFEgEQLlwACfW1+fq0VwkauzltgQuKAd7kvViQQAoLQu
x1Uu5vEN6WrbCpZ2HiEcL9y4
=jZg0
-----END PGP SIGNATURE-----
 
Back
Top