Published on :
Général SASHELP

Sans titre

This code is also available in: Deutsch Español Français
Data Analysis

Type : SASHELP


The data comes exclusively from the example table SASHELP.SHOES.

1 Code Block
HTMSQL
Explanation :
htmSQL block executing an aggregating SQL query (sum of sales by product) filtered by a Web macro variable {&region}. The results are iterated to build a dynamic HTML table.
Copied!
1{query server="odin:5010" ...}
2{sql}
3select product,
4sum(sales) as total label="Total Sales"
5FORMAT=dollar8.
6from sashelp.shoes
7where region='{&region}'
8group BY product
9{/sql}
10...
2 Code Block
HTMSQL
Explanation :
htmSQL block executing an SQL query to extract distinct values from the 'Region' column. These values are used to generate the options (<option>) for an HTML dropdown menu (<select>).
Copied!
1{query server="odin:5010" ...}
2{sql}select distinct region from sashelp.shoes{/sql}
3
4
5{eachrow}{/eachrow}
6
7...
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.