[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-572770-105":53,"doc-detail-572770-en":127},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","proc-sql-hacks-dictionary-tables-hack-series","PROC SQL HACKS - DICTIONARY Tables - Hack Series","","A training-style cheat sheet focused on SAS PROC SQL, presenting a set of practical hacks and mnemonics for writing queries more effectively. It covers the required clause order for SELECT statements, including WHERE, GROUP BY, HAVING, and ORDER BY, and highlights where PROC SQL extends beyond ANSI SQL. The core section explains DICTIONARY tables as read-only metadata views, showing how to explore them with DESCRIBE, query DICTIONARY.COLUMNS, interpret mixed-case behavior, and dynamically find common column names across libraries.",{"@graph":63,"@context":119},[64,80,102],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/proc-sql-hacks-dictionary-tables-hack-series/572770/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/proc-sql-hacks-dictionary-tables-hack-series/572770.png","ImageObject",442,249,{"name":88,"@type":89},"Aldword","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-21","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",6,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"What does the SELECT clause specify in PROC SQL?","Question",{"text":109,"@type":110},"The SELECT clause specifies the columns and their order in the result set.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"How are DICTIONARY tables in SAS SQL accessed?",{"text":114,"@type":110},"DICTIONARY tables are read-only metadata views that can be queried using PROC SQL.",{"name":116,"@type":107,"acceptedAnswer":117},"Why can mixed-case column names affect dictionary queries?",{"text":118,"@type":110},"If column names are stored in mixed case, comparisons may require functions like UPCASE, but this can significantly degrade query performance.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},572770,1792023082,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":142},2336478940917,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","7/29/2020  \n\n| | Create Your Own Adventure  \u003Cbr>29 July 2020  \u003Cbr>Charu ShankarSAS Institute Canada Inc.  \u003Cbr>Co py right © SAS I nstit ute I nc . All rights rese rved.   | \u003Cbr>|\n| --- | --- | --- |\n\n1  \nSAS Senior Technical Trainer, Charu teaches by engaging with logic,visuals and analogies to spark critical thinking. She interviews usersto recommend the right SAS training.  \nSAS blogger, yoga teacher & chef, Charu also helps support userslooking to land work using SAS through Linkedin.  \nCharu has presented at over 100 SAS international user groupconferences on SAS programming, SAS Enterprise Guide, PROC SQL,DS2 programming, Python, Viya etc.  \nCharu Shankar  \nHack \\# 1: PROC SQL Syntax Order Mnemonic  \nHack \\# 2: Know thy data : Dictionary tables  \nHack \\# 3: Summarizing data using the Boolean Gate  \nHack \\# 4: Where ANSI SQL falls short and PROC SQL steps in  \nHack \\# 5: Find your  \ndata Pattern  \n2  \nCo py right © SAS I nstit ute I nc . All rights res e rved.  \n2  \n7/29/2020  \n\n| | \u003Cbr>Hack \\#1  \u003Cbr>PROC SQL Syntax Order Mnemonic   |  |\n| --- | --- | --- |\n| Co py right © SAS I nstit ute I nc . All rights res e rved.   |  | |\n\n3  \n\n| SELECT Statement: Required Clauses  \u003Cbr>\u003Cbr>SELECT object-item \u003C, ... object-item>FROM from-list;  \u003Cbr>Here are two things that SQL always needs:  \u003Cbr>1. What do you want?  \u003Cbr>The SELECT clause specifies the columns and column order.  \u003Cbr>2. Where do you want it from?  \u003Cbr>The FROM clause specifies the data sources.  \u003Cbr>You can query from 1 to 256 tables.   |  |\n| --- | --- |\n| 4  \u003Cbr>Co py right © SAS I nstit ute I nc . All rights res e rved.   | |\n\n4  \n7/29/2020  \n\n| SELECT Statement: Syntax Order Mnemonic  \u003Cbr>SO  \u003Cbr>FEW  \u003Cbr>WORKERS  \u003Cbr>GO  \u003Cbr>HOME  \u003Cbr>ON TIME   SELECT object-item \u003C, ... object-item>FROM from-list  \u003Cbr>\u003CWHERE sql-expression>  \u003Cbr>\u003CGROUP BY object-item \u003C, … object-item >>\u003CHAVING sql-expression>  \u003Cbr>\u003CORDER BY order-by-item \u003CDESC>\u003C, … order-by-item>> ;   |  |\n| --- | --- |\n| • The WHERE clause specifies data that meets certain conditions.  \u003Cbr>• The GROUP BY clause groups data for processing.  \u003Cbr>• The HAVING clause specifies groups that meet certain conditions.  \u003Cbr>• The ORDER BY clause specifies an o5rder for the data.   | |\n\n5  \n\n| 6  \u003Cbr>Co py right © SAS I nstit ute I nc . All rights res e rved.   | |\n| --- | --- |\n\n6  \n7/29/2020  \n\n| | \u003Cbr>Hack \\#2  \u003Cbr>Know Thy Data: DICTIONARY Tables   |  |\n| --- | --- | --- |\n| Co py right © SAS I nstit ute I nc . All rights res e rved.   |  | |\n\n7  \n# DICTIONARY Tables: Overview\n\nDICTIONARY tables are Read-Only metadata views that contain  \nsession metadata, such as information aboutSAS libraries, data sets, and external files in useor available in the current SAS session.DICTIONARY tables are  \n• created at SAS session initialization  \n• updated automatically by SAS  \n• limited to Read-Only access.  \nYou can query DICTIONARY tables with PROC SQL.  \n8  \nCo py right © SAS I nstit ute I nc . All rights res e rved.  \n8  \n7/29/2020  \n\n| Exploring DICTIONARY Tables  \u003Cbr>You can use a DESCRIBE statement to explore the structure ofDICTIONARY tables:   |  |\n| --- | --- |\n| Partial Log  \u003Cbr>| \u003Cbr>describe table dictionary . tables;   |\n| 9  \u003Cbr>Co py right © SAS I nstit ute I nc . All rights res e rved.  \u003Cbr>\u003Cbr>NOTE: SQL table DICTIONARY.TABLES was created like:  \u003Cbr>create table DICTIONARY.TABLES  \u003Cbr>(  \u003Cbr>libname char(8) label='Library Name',  \u003Cbr>memname char(32) label='Member Name',  \u003Cbr>...  \u003Cbr>crdate num format=DATETIME informat=DATETIME label='Date Created',modate num format=DATETIME informat=DATETIME label='Date Modified',nobs num label='Number of Physical Observations',  \u003Cbr>obslen num label='Observation Length',  \u003Cbr>nvar num label='Number of Variables', . . . );   |  |\n\n9  \n\n| Querying Dictionary Information  \u003Cbr>Display information about the columns in sashelp.cars.   |  |\n| --- | --- |\n| \u003Cbr>title 'Columns in the sashelp . carsTable';  \u003Cbr>proc sql; Taarlealnamesso store(mdienmnameuppercsa)se  \u003Cbr>select Name,Type,","cbCaibnwA0ufh7px","https://ap.wps.com/l/cbCaibnwA0ufh7px","pdf",2107588,24,"English","# Hack # 1: PROC SQL Syntax Order Mnemonic\n# Hack # 2: Know Thy Data: DICTIONARY Tables\n## DICTIONARY Tables: Overview\n## Exploring DICTIONARY Tables\n## Querying Dictionary Information\n## Using Dictionary Information\n## Finding Common Column Names Dynamically","[{\"question\":\"What does the SELECT clause specify in PROC SQL?\",\"answer\":\"The SELECT clause specifies the columns and their order in the result set.\"},{\"question\":\"How are DICTIONARY tables in SAS SQL accessed?\",\"answer\":\"DICTIONARY tables are read-only metadata views that can be queried using PROC SQL.\"},{\"question\":\"Why can mixed-case column names affect dictionary queries?\",\"answer\":\"If column names are stored in mixed case, comparisons may require functions like UPCASE, but this can significantly degrade query performance.\"}]","PROC SQL HACKS - DICTIONARY Tables - Hack Series | PDF",1791929202,8]