The Essential PROC SQL Handbook - Example Code
/**********************************************************************************************************************/
/* The Essential PROC SQL Handbook - Example Code
/* Katherine Prairie
/********************************************************************************************************************
/* Created: October 31, 2005 - page numbers from published copy of book
/* Notes:
/* 1. Each SQL statement includes PROC SQL, QUIT and LIBNAME statements to allow the SQL statement to be run in
/* isolation. The PROC SQL and LIBNAME statements are required only once for any number of SQL statements. It is only
/* necessary to add these statements again if a SAS DATA Step or procedure has been run or the LIBNAME assignment changes
/* The QUIT statement is required only when you wish to stop the SQL procedure.
/*
/* 2. Selective capitalization, indentation and other spaces have been added for readability;
/********************************************************************************************************************/
OPTIONS linesize=256 nocenter nonumber stimer nodate;
LIBNAME bluesky "C:\mydata\bluesky bookstore\";
/*******************************************************************************
/*Create the tables in the book
/******************************************************************************/
PROC SQL;
/* Drop the tables if they already exist*/
DROP table bluesky.reprint;
DROP table bluesky.client;
DROP table bluesky.currency;
DROP table bluesky.shipping;
DROP table bluesky.orders;
DROP table bluesky.address;
DROP table bluesky.stock;
/* Create the tables*/
CREATE table bluesky.reprint (
reprint char(1),
cutOff num );
CREATE table bluesky.client (
clientNo num,
company char(40),
cont_fst char(10),
cont_lst char(15),
dept char(25),
phone char(25),
fax char(25) );
CREATE table bluesky.currency (
currency char(3),
cur_date date,
exchRate num );
CREATE table bluesky.shipping(
delCode char(3),
delType char(25),
charge num );
CREATE table bluesky.orders (
prodCode char(6),
ord_date date,
quantity num,
totsale num,
currency char(3),
delCode char(3),
clientNo num,
invoice char(10));
CREATE table bluesky.order_2001_2002 (
prodCode char(6),
ord_date date,
quantity num,
totsale num,
currency char(3),
delCode char(3),
clientNo num,
invoice char(10));
CREATE table bluesky.stock (
ISBN char(13),
title char(50),
auth_fst char(10),
auth_lst char(15),
category char(20),
reprint char(1),
stock num,
yrPubl num,
prodCode char(6),
price num);
CREATE table bluesky.address (
clientNo num,
address char(50),
city char(30),
state char(2),
ZIP_post char(15),
country char(25),
email char(30) );
/* Describe the table structures to confirm they were CREATEd correctly*/
DESCRI
SAS 中Proc SQL的应用与提高_计算机软件及应用_IT/计算机_专业资料。SAS 9.... The Essential PROC SQL... 72页 免费 SAS Proc Mixed在林木育... 暂无...
sas proc sql(01)_IT/计算机_专业资料。sas proc sql(01)/***...the source code from every example in the book for which output is shown. The examp...
proc sql。Creating Macro Variables with Proc SQL reports PROC SQL tables (SAS data files) SAS data views (PROCreating Macro Variables with Proc SQL ...
sas using sql 2005 16页 免费 The Essential PROC SQL... 72页 免费 ...SUGI 29 Coders' Corner Paper 065-29 Subsetting SAS? Data Set by Using ...
SAS Utility Proc 2 SQL_计算机软件及应用_IT/计算机_专业资料。SAS 培训材料... The Essential PROC SQL... 72页 免费 Using Proc SQL and ODB... 6页 ...
The Essential PROC SQL H... 72页 免费 chapter1-2_Handbook of T... 55页 免费 SAS 4页 5财富值 SAS 29页 免费 SAS 95页 2财富值...
玩家 Kirk Lafler 提供的 25 Best Practice Coding Techniques for SAS Users。...21. Use the PROC SQL VALIDATE clause to test syntax and compile time ...
Ever since SAS implemented SQL (PROC SQL) in Version 6.0, it opened a whole new arena for SAS users. I see the distinct advantage of PROC SQL as...
The following SAS program is submitted: proc sql; select one.*, sales ...A. number of users B. routine reporting C. database design D. corporate ...
Below is the syntax for the Pass-Through Facility. 2 PROC SQL; CONNECT ...Proceedings of the Twenty-Sixth Annual SAS Users Group international Conference...
热门文档