Desktop productivity for business analysts and programmers

randomly access a observation from data set

Reply
N/A
Posts: 0

randomly access a observation from data set

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..
SAS Employee
Posts: 159

Re: randomly access a observation from data set

PROC surveyselect data=TableB method=srs n=4 out=sample1;
RUN;

proc append data=sample1 base=TableA; run;
N/A
Posts: 0

Re: randomly access a observation from data set

proc sql;
insert into TableA select * from TableB(obs=2 firstobs=2) ;
quit;
Ask a Question
Discussion stats
  • 2 replies
  • 90 views
  • 0 likes
  • 2 in conversation