I'm using a database where the current tables only hold 6 months of data before moving to an archive table. I'm pulling from a current table, and would like to keep the older data while adding new data.
For example, the current table holds data from 9/24/19 to 3/24/20. I'd like to pull all of that today. When I pull the data again on 4/24/20, I'd like to have all the data from 9/24/19 to 4/24/20. What is the best way to keep the old data that I've already pulled, and add the current/new data from the current table?
It would probably be best to keep the data in a partitioned form. I.e . You would have a different physical table per month. This allows you to drop the oldest each month without touching the other 11 months. Then create new table as an extract of the last month. Alternatively, you can keep a copy of the last 6 months of the archive in monthly parts and append them to a current extract of the active data.
It would probably be best to keep the data in a partitioned form. I.e . You would have a different physical table per month. This allows you to drop the oldest each month without touching the other 11 months. Then create new table as an extract of the last month. Alternatively, you can keep a copy of the last 6 months of the archive in monthly parts and append them to a current extract of the active data.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.