TAILIEUCHUNG - SAS 9.1 SQL Procedure- P3

Tham khảo tài liệu 'sas sql procedure- p3', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 96 Updating Data Values in a Table A Chapter 4 Output Rows Inserted with a Query World s Largest Countries Name Capital Population Brazil Brasilia 160 310 357 China Beijing 1 202 215 077 India New Delhi 929 009 120 Indonesia Jakarta 202 393 859 Russia Moscow 151 089 979 United States Washington 263 294 808 If your query does not return data for every column then you receive an error message and the row is not inserted. For more information about how PROC SQL handles errors during data insertions see Handling Update Errors on page 98. Updating Data Values in a Table You can use the UPDATE statement to modify data values in tables and in the tables that underlie PROC SQL and SAS ACCESS views. For more information about updating views see Updating a View on page 107. The UPDATE statement updates data in existing columns it does not create new columns. To add new columns see Altering Columns on page 99 and Creating New Columns on page 18. The examples in this section update the original NEWCOUNTRIES table. Updating All Rows in a Column with the Same Expression The following UPDATE statement increases all populations in the NEWCOUNTRIES table by five percent proc sql update set population population title Updated Population Values select name format 20. capital format 15. population format from Please purchase PDF Split-Merge on to remove this watermark. Creating and Updating Tables and Views A Updating Rows in a Column with Different Expressions 97 Output Updating a Column for All Rows Updated Population Values Name Capital Population Brazil Brasilia 168 325 875 China Beijing 1 262 325 831 India New Delhi 975 459 576 Indonesia Jakarta 212 513 552 Russia Moscow 158 644 478 United States Washington 276 459 548 Updating Rows in a Column with Different Expressions If you want to update some but not all of a column s values then use a WHERE expression in the UPDATE statement. You can use multiple .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.