Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Purge table - older than four weeks data

$
0
0

Hi Experts,

i have DB named "Test_Data" -> under this DB i have tables like a,b,c... and so on.

in all the tables i have column "Week_no" and all table will have data, week_no wise.

I want to write the procedure to purge the tables which are having older than 4 weeks data.

in my table week_no will be like this "201409" and so on.

this procedure we will run weekly once.

Can any one please help me to write SQL procedure..


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>