Desktop productivity for business analysts and programmers

Remove Rows with Specific Blank Columns

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

Remove Rows with Specific Blank Columns

Hello,

My enterprise edition is 4.3. and I'm preparing data for geocoding addresses in ArcGIS. I am trying to remove the rows where column, Street_line1, has a blank entry. I am new to SAS Enterprise so I'm not sure if the drop function is appropriate here and using delete function makes me nervous about screwing up the database. I'd also like a count of the removed records so I can make note of them in the map.

Thanks for any help and suggestions!


Accepted Solutions
Solution
‎07-30-2014 12:06 PM
Trusted Advisor
Posts: 1,060

Re: Remove Rows with Specific Blank Columns

If you use the Query Builder on your source dataset, default behaviour is to create a new SAS dataset, with your transformed data. Adding a filter for "Street_line1 is not null" should do it. To get a count, one way is to create a SAS program like the following:

proc sql noprint;

select count(*) into :RecCount from have where Street_line1 is null;

quit;

which will put the count into macro variable &RecCount.

Tom

View solution in original post


All Replies
Solution
‎07-30-2014 12:06 PM
Trusted Advisor
Posts: 1,060

Re: Remove Rows with Specific Blank Columns

If you use the Query Builder on your source dataset, default behaviour is to create a new SAS dataset, with your transformed data. Adding a filter for "Street_line1 is not null" should do it. To get a count, one way is to create a SAS program like the following:

proc sql noprint;

select count(*) into :RecCount from have where Street_line1 is null;

quit;

which will put the count into macro variable &RecCount.

Tom

☑ This topic is SOLVED.

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

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