Year: 2016
PROC SQL: Using SAS
INSTRUCTIONS FOR CREATING TABLES AND USING CODE EXAMPLES Create the tables using the DATA steps below by copying and pasting the code into the SAS Display Manager. Each DATA step consists of complete code and instream data. Copy and paste the PROC SQL code into the SAS Display Manager. Run the code corresponding to the selected example. READ IN THE SAMPLE DATA The following DATA step code is set up to store all files andRead More
Top 10 Most Powerful Functions for PROC SQL
PROC SQL is not only one of the many SAS procedures and also a distinctive subsystem with all common features from SQL (Structured Query Language). Equipped with PROC SQL, SAS upgrades to a full-fledging relational database management system. PROC SQL provides alternative ways to manage data other than the traditional DATA Step and SAS procedures. In addition, SAS’s built-in functions are the add-on tools to increase the power of PROC SQL. In the attached PDFRead More
How to import Data into Table using Teradata SQL Assistant
We can use Teradata SQL Assistant to load data from file into table in Teradata. https://www.youtube.com/watch?v=3pAyKj7GLkQ
Install Adventure Works database from backup
The Adventure Works 2014 Data Warehouse database can be installed by restoring a database backup. 1. Download Adventure Works DW 2014 Full Database Backup.zip . 2. From File Download, click Save. Once it is saved, open the folder. 3. Extract the AdventureWorks2014.bak file to a location on your local server. Note: The default 64-bit path is C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Backup. Use C:\Program Files (x86)\… for 32-bit SQL Server 2014. 4. From SQL Server Management StudioRead More
PROC IMPORT
How do I read/write Excel files in SAS? Reading an Excel file into SAS Suppose that you have an Excel spreadsheet called auto.xlsx. The data for this spreadsheet are shown below. MAKE MPG WEIGHT PRICE AMC Concord 2930 4099 AMC Pacer 17 3350 4749 AMC Spirit 22 2640 3799 Buick Century 20 3250 4816 Buick Electra 15 4080 7827 Using the Import Wizard is an easy way to import data into SAS. The Import Wizard can be foundRead More
PROC Export
PROC Export to Excel – Multiple tables to one xlsx file on different sheets The XLSX engine is enhanced to write multiple sheets per Microsoft Excel file in the first maintenance release of SAS 9.3. In SAS 9.3, the XLSX engine supports writing only one sheet in an Excel workbook. You can work around this by setting DBMS=EXCEL or DBMS=EXCELCS in your code. This will generate more than one sheet In the SAS 9.3 TS1M1Read More
Automatically assign libraries at startup
Library assignments can be a drag sometimes. All you want is for your libraries to be automatically assigned in your session. Can you let SAS do this? Sure, here’s how (FYI, I’m suggesting an interactive method here but if you prefer writing code, you can certainly embed multiple Libname statements in your programs to assign them at startup or even include them in your autoexec.sas program file). Click on the New Library icon. Enter theRead More
SAS Shortcuts
Clear log, output & submit code in one keystroke Activate your function keys by typing Keys in your command window. 2. Find a function that hasn’t been programmed yet. I’ll pick F12. 3. Type in this command: Clear Log; Clear Output; Submit; Now run any program by hitting the F12 key or whichever key you used as your shortcut for this tip. See how it automatically clears your log, output windows and submitsRead More
SAS Add-in for Microsoft office
SAS Add-In For Microsoft Office: Creating and Managing SAS Favorites https://www.youtube.com/watch?v=Ee-rv4n2ll0