文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 文学 > The Essential PROC SQL Handbook for SAS Users
侵权投诉

The Essential PROC SQL Handbook for SAS Users

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

第1页

你可能喜欢

热门文档

相关文档

  • SAS 中Proc SQL的应用与提高

    SAS 中Proc SQL的应用与提高_计算机软件及应用_IT/计算机_专业资料。SAS 9.... The Essential PROC SQL... 72页 免费 SAS Proc Mixed在林木育... 暂无...

  • sas proc sql(01)

    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

    proc sql。Creating Macro Variables with Proc SQL reports PROC SQL tables (SAS data files) SAS data views (PROCreating Macro Variables with Proc SQL ...

  • Subsetting SAS Data Set by Using 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

    SAS Utility Proc 2 SQL_计算机软件及应用_IT/计算机_专业资料。SAS 培训材料... The Essential PROC SQL... 72页 免费 Using Proc SQL and ODB... 6页 ...

  • SAS handbook chapter1

    The Essential PROC SQL H... 72页 免费 chapter1-2_Handbook of T... 55页 免费 SAS 4页 5财富值 SAS 29页 免费 SAS 95页 2财富值...

  • SAS编程高手必看的25个技巧

    玩家 Kirk Lafler 提供的 25 Best Practice Coding Techniques for SAS Users。...21. Use the PROC SQL VALIDATE clause to test syntax and compile time ...

  • Top Ten Reasons to Use PROC SQL

    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...

  • SAS Base Programming for SAS 9

    The following SAS program is submitted: proc sql; select one.*, sales ...A. number of users B. routine reporting C. database design D. corporate ...

  • SQL过程:何时以及如何使用它?

    Below is the syntax for the Pass-Through Facility. 2 PROC SQL; CONNECT ...Proceedings of the Twenty-Sixth Annual SAS Users Group international Conference...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email