Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Deleting LASR records using proc imstat with Merge statement.

Accepted Solution Solved
Reply
Highlighted
Occasional Contributor
Posts: 19
Accepted Solution

Deleting LASR records using proc imstat with Merge statement.

1) I have a dataset A (having millions of records) in LASR library. 

2) Importing B file with few hundred rows.

3) Need to compare A and B and delete common records from A (lasr library) without creating a temporary copy.

 

Solution:

Using imstat statement--(not working)

 

proc imstat data=LASRLIB.A;
merge LASRLIB.A (in=a)
                  B    (in=b);
if a and b;
run;
deleterows / purge; 
run;

 

(Note: Merge not working with proc imstat.)

 

 

Is there any other way to do it?


Accepted Solutions
Solution
a week ago
Occasional Contributor
Posts: 19

Re: Deleting LASR records using proc imstat with Merge statement.

Posted in reply to jitinsethi07

Got the solution!

 

Storing all unique values in macro variable and passing in where clause of proc imstat.

 

proc imstat = lasrlib.A;

where column = &macro;

run;

deleterows / purge;

run;

View solution in original post


All Replies
Solution
a week ago
Occasional Contributor
Posts: 19

Re: Deleting LASR records using proc imstat with Merge statement.

Posted in reply to jitinsethi07

Got the solution!

 

Storing all unique values in macro variable and passing in where clause of proc imstat.

 

proc imstat = lasrlib.A;

where column = &macro;

run;

deleterows / purge;

run;

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 147 views
  • 1 like
  • 1 in conversation