space
Previous Page | Next Page

SAS/IntrNet 9.2: htmSQL

retail1.hsql Sample Input File

{*--------------------------------------------------------------------*}
{* Note: You do not need to save this file from your Web browser.     *}
{* This file is available in the htmSQL "samples" subdirectory.       *}
{*                                                                    *}
{* This input file produces a Web page that lists sales information   *}
{* that is stored in the 'retail' SAS data set of the SASHELP library.*}
{*--------------------------------------------------------------------*}

<HEAD><TITLE>htmSQL: Retail Data</TITLE></HEAD>
<BODY BGCOLOR="FFFFFF"> 

{*--------------------------------------------------------------------*}
{* The following section queries the SAS server that is identified by *}
{* the server= parameter and dynamically generates the sales          *}
{* information.                                                       *} 
{*--------------------------------------------------------------------*}

{query server="sampnode.pc.sas.com:5000"}
{sql}
select sales,date,year,month,day 
from sashelp.retail where
year = {&PARAM}
{/sql}

{*--------------------------------------------------------------------*}
{* We use a table to show the sales information.                      *}
{*--------------------------------------------------------------------*}

<TABLE BORDER=1 ALIGN=LEFT>
 <TR>
 <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Sales</TH>
 <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Date</TH>
 <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Year</TH>
 <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Month</TH>
 <TH ALIGN=CENTER VALIGN=MIDDLE BGCOLOR="FF0000" NOWRAP>Day</TH>
 </TR>

{*--------------------------------------------------------------------*}
{* Each row of our results set corresponds to a row in the table      *}
{*--------------------------------------------------------------------*}

 {eachrow}
 <TR>
 <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&sales}</TD>
 <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&date}</TD>
 <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&year}</TD>
 <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&month}</TD>
 <TD ALIGN=LEFT VALIGN=MIDDLE NOWRAP>{&day}</TD>
 </TR>
 {/eachrow}
</TABLE>

{*--------------------------------------------------------------------*}
{* End the query section.                                             *}
{*--------------------------------------------------------------------*}

{/query}
</BODY>

Previous Page | Next Page | Top of Page