13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

858 Creating a DBMS Table 4 Chapter 29Output 29.12Deleting DBMS DataAIRLINE.STAFF After Deleting Connecticut Employees 1OBS IDNUM LNAME FNAME CITY STATE HPHONE1 1400 ALHERTANI ABDULLAH NEW YORK NY 212/586-08082 1350 ALVAREZ MERCEDES NEW YORK NY 718/383-15493 1401 ALVAREZ CARLOS PATERSON NJ 201/732-87874 1499 BAREFOOT JOSEPH PRINCETON NJ 201/812-56655 1101 BAUCOM WALTER NEW YORK NY 212/586-80606 1402 BLALOCK RALPH NEW YORK NY 718/384-28497 1479 BALLETTI MARIE NEW YORK NY 718/384-88168 1739 BRANCACCIO JOSEPH NEW YORK NY 212/587-12479 1658 BREUHAUS JEREMY NEW YORK NY 212/587-362210 1244 BUCCI ANTHONY NEW YORK NY 718/383-333411 1383 BURNETTE THOMAS NEW YORK NY 718/384-356912 1574 CAHILL MARSHALL NEW YORK NY 718/383-233813 1789 CARAWAY DAVIS NEW YORK NY 212/587-900014 1404 COHEN LEE NEW YORK NY 718/384-294615 1065 COPAS FREDERICO NEW YORK NY 718/384-561816 1876 CHIN JACK NEW YORK NY 212/588-563417 1129 COUNIHAN BRENDA NEW YORK NY 718/383-231318 1988 COOPER ANTHONY NEW YORK NY 212/587-122819 1405 DACKO JASON PATERSON NJ 201/732-232320 1983 DEAN SHARON NEW YORK NY 718/384-1647Creating a DBMS TableYou can create new tables in your DBMS by using the SQL procedure. This exampleuses the SQL procedure to create the Oracle table GTForty by using data from theOracle Staff and Payroll tables.libname mydblib oracle user=testuser password=testpass;proc sql;create table mydblib.gt<strong>for</strong>ty asselect lname as lastname,fname as firstname,salary as Salary<strong>for</strong>mat=dollar10.2from mydblib.staff a,mydblib.payroll bwhere (a.idnum eq b.idnum) and(salary gt 40000);quit;options obs=20;proc print data=mydblib.gt<strong>for</strong>ty noobs;title ’Employees with salaries over $40,000’;<strong>for</strong>mat salary dollar10.2;run;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!