BookmarkSubscribeRSS Feed
aloou
Obsidian | Level 7

Hello,

i would like to create a table using proc fedsql but i can not find how.

same like this procedure

proc sql;

create table casuser.x like biblio.y;

quit;

 

thank you

1 REPLY 1
SASJedi
Ammonite | Level 13

The code you proposed would create a new table but without any rows. Consider:

proc sql;
create table work.cars like sashelp.cars;
quit;

A peek at the WORK library will reveal a table named cars, but there are no data rows in the table - just the table structure.

To make a COPY of the table, including some of the data from the original table:

proc sql;
create table cars as
select * from sashelp.cars where Make='Audi';
quit;

Now a peek at the WORK library will reveal a table named cars with all of the columns from the original table, but only rows where the Make is Audi.

 

Check out my Jedi SAS Tricks for SAS Users

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 2095 views
  • 1 like
  • 2 in conversation