BookmarkSubscribeRSS Feed
deleted_user
Not applicable
proc sql;
insert into TableA select * from TableB where obsnum=2;
quit;

i have to fetch row no 2 from TableB and append it to TableA.

here obsnum is not working pleae tell me other option..
2 REPLIES 2
GertNissen
Barite | Level 11
PROC surveyselect data=TableB method=srs n=4 out=sample1;
RUN;

proc append data=sample1 base=TableA; run;
deleted_user
Not applicable
proc sql;
insert into TableA select * from TableB(obs=2 firstobs=2) ;
quit;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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