|
I believe that the first SELECT statement works, just not the way that you want
it to work. The order of the format= and AS options should not matter. The
type of value that you are creating does matter. In the first SELECT, the SQL
processor produces a real number that needs a format to look like a date. For
example, the value produced by SAS SQL might be -45234. If the value were going
to a monitor or printer, SAS would apply the weekdate9. format and display or
print FRIDAY. It seems likely to me that htmsql works more like the SAS
macroprocessor and stores a hex conversion of the floating-point representation
of -45234 as a character string. The second SELECT leaves less open to
interpretation. It tell the SQL processor to apply the weekdate9. format to the
real number value of date and produce a character string ("FRIDAY"). Even
htmsql understands that.
OOPS in this case does what it says. In the first SELECT SAS SQL expects late
binding of the format to the value it creates; htmsql drops the format (OOPS!).
Sig
-----Original Message-----
From: Michael Thomas <mjthom4@USWEST.COM> at Internet-E-Mail
Sent: Monday, July 10, 2000 10:02 AM
To: SAS-L@LISTSERV.UGA.EDU at Internet-E-Mail
Subject: htmsql question
why, under htmsql, does one of these select statements work and the
other fails....
Select date format=weekdate9. as day /* fails */
Select put(date,weekdate9.) as day /* works */
curious, eh??
--
Michael Thomas
Consultant, Trilogy
phone: (303) 703-2199
pager: (303) 821-1582
|