BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Pato485
Calcite | Level 5

How can i save table and it should have date of save in the name of table

 

so how can i save table ...

 

proc sql,

 

create table work.zaloha_% as....;

quit; (and % should be for today 20012023, tomorrow it should be 21012023.... and so on, so i want to have backup of table saved every day. how can i do it?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You would be wise to use dates that sort properly, but the way you have chosen the dates, they will not sort properly, the table for 20012023 will sort above 20022023 but it will not be next to 21012023. So, use YYMMDD dates.

 

create table work.zaloha_%sysfunc(putn(%sysfunc(today()),yymmddn8.)) ...

 

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

You would be wise to use dates that sort properly, but the way you have chosen the dates, they will not sort properly, the table for 20012023 will sort above 20022023 but it will not be next to 21012023. So, use YYMMDD dates.

 

create table work.zaloha_%sysfunc(putn(%sysfunc(today()),yymmddn8.)) ...

 

--
Paige Miller

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 135 views
  • 0 likes
  • 2 in conversation