Chapter Contents

Previous

Next
The SQL Procedure

Example 11: Retrieving Values with the SOUNDS-LIKE Operator


Procedure features:
ORDER BY clause
SOUNDS-LIKE operator
Table: PROCLIB.STAFF

This example returns rows based on the functionality of the SOUNDS-LIKE operator in a WHERE clause.


Input Table
PROCLIB.STAFF [HTML Output]
 [Listing Output]


Program

libname proclib 'SAS-data-library';
options nodate pageno=1 linesize=80 pagesize=60;
 Note about code
proc sql;
   title "Employees Whose Last Name Sounds Like 'Johnson'";
   select *
      from proclib.staff
 Note about code
      where lname=*"Johnson"
      order by 2;


Output
[HTML Output]  [Listing Output]
 Note about code
   title "Employees Whose Last Name Sounds Like 'Sanders'";
   select *
      from proclib.staff
      where lname=*"Sanders"
      order by 2;
[HTML Output]  [Listing Output]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.