![]() ![]() SAS 9.1.3 documentation includes thousands of This location often because we’ll be adding books as they become available. We continue to use the data from the above example and delete the rows from the table in which the salary of the employees is greater than 900.Use the PDF documentation below to browse or print SAS 9.1.3 reference documentation when you need it. The delete operation in SQL involves removing certain values from the table using the SQL DELETE statement. ![]() When the above code is executed we get the following result − SQL DELETE Operation Below we first create a new table named EMPLOYEES2 and then update it using the SQL UPDATE statement. We can update the SAS table using the SQL Update statement. When the above code is executed we get the following result − SQL UPDATE Operation In the result we get only the observation which have make as 'Audi' and type as 'Sports'. The below program queries the CARS data set with a where clause. When the above code is executed we get the following result − SQL SELECT with WHERE Clause SELECT make,model,type,invoice,horsepower The query fetches some of the columns of the data set. In The below program queries the SAS data set named CARS available in the library SASHELP. The Read operation in SQL involves writing SQL SELECT queries to read the data from the tables. When the above code is executed we get the following result − SQL Read Operation Then we write a SQL query to create a table from the variables of this data set. In the below example, first we declare a data set named TEMP containing the raw data. Using SQL we can create new data set form raw data. The SQL query is written below the PROC SQL statement followed by the QUIT statement.īelow we will see how this SAS procedure can be used for the CRUD (Create, Read, Update and Delete)operations in SQL. The basic syntax for using PROC SQL in SAS is −įollowing is the description of the parameters used − The example of all these scenarios is described below. This procedure can not only give back the result of an SQL query, it can also create SAS tables & variables. The procedure PROC SQL is used to process the SQL statements. Most of the ANSI SQL syntax is supported. ![]() SAS offers extensive support to most of the popular relational databases by using SQL queries inside SAS programs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |