Sample Data Source 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 data source and dynamically generates the sales information. *}
{*--------------------------------------------------------------------*}
{query datasrc="retail"}
{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>
![](../../../../common/61925/HTML/default/images/spacer.gif) |
![](../../../../common/61925/HTML/default/images/spacer.gif) |
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.