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

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

Register now!

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
  • 578 views
  • 3 likes
  • 3 in conversation