BookmarkSubscribeRSS Feed
Matt3
Quartz | Level 8

Hi,

 

can I disable adding rows in which some variables are missing into  my dataset?

 

Thanks

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

When do you experience null values being inserted into your data?

Matt3
Quartz | Level 8

Haha good point, I mean inserted rows with some columns that contains missing values.

Patrick
Opal | Level 21

@Matt3

Use a WHERE clause where you exclude all observations having one or multiple variables with missing values.

You can use the CMISS() function for such a test. 

http://support.sas.com/documentation/cdl/en/lefunctionsref/69762/HTML/default/viewer.htm#p1tth4ltf64...

Matt3
Quartz | Level 8

I dont need excluding observation but prevent from not inserting them.

I found integrity constrains in proc datasets, hovewer I cant find option for preventing observation from deleting.

 

Patrick
Opal | Level 21

@Matt3

Please explain in detail what you have and what you're trying to achieve so can understand your problem and give you a suitable answer.

 

Using Integrity Constraints will protect your table against Inserting/Updating rows with values you don't want. BUT if an integrity constraint gets hit your job will throw an error and fail. Is that what you want?

 

There are no integrity constraints for "do not delete" except for referential integrity which prevents deletion of parent records when there are dependent child records in another table.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 835 views
  • 2 likes
  • 3 in conversation