Published on :
ETL SASHELP

Extracting ORSALES Sales Data

This code is also available in: Deutsch Español Français
Awaiting validation
This script uses the SQL procedure to extract detailed sales information (year, quarter, product, quantity, profit, price) from the SASHELP system library and saves the result in a temporary table named QUERY_FOR_ORSALES.
Data Analysis

Type : SASHELP


Data comes from the SASHELP.ORSALES table, provided by default with the SAS installation.

1 Code Block
PROC SQL Data
Explanation :
Execution of an SQL query to select 8 specific columns from the source table and create a new table in the WORK library.
Copied!
1PROC SQL;
2 CREATE TABLE WORK.QUERY_FOR_ORSALES AS
3 SELECT t1.Year,
4 t1.Quarter,
5 t1.Product_Line,
6 t1.Product_Category,
7 t1.Product_Group,
8 t1.Quantity,
9 t1.Profit,
10 t1.Total_Retail_Price
11 FROM SASHELP.ORSALES t1;
12QUIT;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.