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.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 221 views
  • 0 likes
  • 2 in conversation