LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 10 Jul 2000 18:33:00 -0400
Reply-To:   HERMANS1 <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   HERMANS1 <HERMANS1@WESTAT.COM>
Subject:   Re: htmsql question
Comments:   To: Michael Thomas <mjthom4@USWEST.COM>
Content-Type:   text/plain; charset=US-ASCII

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


Back to: Top of message | Previous page | Main SAS-L page