Write a PROC SQL statement. Remember that all statements in SAS are followed by a semicolon. Your initial line should look like this:
PROC SQL;
Provide a title for the results table in the second line of your statement, such as 'Results Table.' Be sure the name of the table is in single quotation marks. You don't need a semicolon at the end of this line since it's part of an SQL statement.
Select all the data from the first table in the third line. The third line might read, "Select * From Table1." The asterisk tells SAS to select all fields from the first table. You don't need quotation marks or a semicolon.
Type "EXCEPT" in the fourth line. Again, you don't need quotation marks or a semicolon.
Select all the data from the second table in the fifth line. The fifth line might read, "Select * From Table2." Again, you don't need quotation marks but you do need a semicolon since you're concluding your SQL statement.
Type "QUIT;" in your sixth and last line. You'll need a semicolon but no quotation marks. Run the program. Your output should show a list of records that don't match.
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.