BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MargoBlue
Fluorite | Level 6

Please could you explain what makes ':' after the name of the table?

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

@MargoBlue wrote:
Please could you explain what makes ':' after the name of the table? It merges tables cost1 cost3 cost4 and tables from cost33 to cost37?

merge cost1-cost4 cost2: cost33-37;

It's just like a wildcard and will pick any table starting with name cost2 - i.e. cost212 cost2abc .....

Docu here.

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

It simply means 'all the table names starting with cost2'...

 

See this small example

 

data cost1;
id = 1; x = 2;
run;

data cost2;
id = 1; y = 3;
run;

data cost3;
id = 1; y = 3;
run;

data want;
   merge cost:;
   by id;
run;
Patrick
Opal | Level 21

@MargoBlue wrote:
Please could you explain what makes ':' after the name of the table? It merges tables cost1 cost3 cost4 and tables from cost33 to cost37?

merge cost1-cost4 cost2: cost33-37;

It's just like a wildcard and will pick any table starting with name cost2 - i.e. cost212 cost2abc .....

Docu here.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 436 views
  • 3 likes
  • 3 in conversation