0 votes
in Software Defined Networking by

Differences between WHERE and IF statement?

1 Answer

0 votes
by

For detailed explanation, see this tutorial -SAS : Where Vs IF

WHERE statement can be used in procedures to subset data while IF statement cannot be used in procedures.

WHERE can be used as a data set option while IF cannot be used as a data set option.

WHERE statement is more efficient than IF statement. It tells SAS not to read all observations from the data set

WHERE statement can be used to search for all similar character values that sound alike while IF statement cannot be used.

WHERE statement can not be used when reading data using INPUT statement whereas IF statement can be used.

Multiple IF statements can be used to execute multiple conditional statements

When it is required to use newly created variables, useIF statement as it doesn't require variables to exist in the READIN data set

...