I have a large SQL table (called uploads) i wish to trim a lot of data out of to reduce the overall filesize which is balooning.
I am no SQL expert so any help would be greatly appreciated.
Uploaded files are saved directly into a database in a column as xml data. The column is called 'XMLData'
I want to seach the table and remove uploaded file data from the 'xmldata' column that is older than 1 month. - this task will be run on a regular basis, am i best off using a query or a stored procedure? I dont know whats best?
Basically this is what i want to do....
Where column 'messagetype'=AddAttachment' or 'App'
and 'datestamp' column is more than 1 month old..
remove the content data between the tags <contents> </contents> in the 'XMLdata' column.
Thanks for any help and pointers in advance.
Microsoft SQL ServerMicrosoft SQL Server 2008SQL
8/22/2022 - Mon
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.