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 (April 2002, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 4 Apr 2002 14:45:13 -0600
Reply-To:     "Smith, Curtis, Mr, DCAA" <Curtis.Smith@DCAA.MIL>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Smith, Curtis, Mr, DCAA" <Curtis.Smith@DCAA.MIL>
Subject:      Reading MS-Access into SAS Using DDE - SOLVED
Content-Type: multipart/alternative;

As usual, the good folks at SI (in this case, Peter Ruzsa) solved my problem. (Ian Whitlock just sent me an e-mail with the correct answer also.) Here's the solution. I have an MS-Access table with an amount field. I create the table by downloading data from an ERP system directly into the MS-Access table. I defined the amount field in the ERP query as being numeric with two decimal places. When I view the data in MS-Access I see numeric values and a decimal point. I then formatted the data in MS-Access to be fixed length with two decimals. When I view the table, that's just what I see. So, in my SAS code, I specified an informat with two decimals. But, SAS did not read the data right in all cases. The trouble values are those when the right-most decimals are zero. As it turns out, even though MS-Access shows the two decimals, even when one or both are zero, the zero decimal values are not actually stored in the MS-Access table. So, there is no bug in SAS. Rather, it's the way MS-Access stores versus displays the data. As for my informat - I thought sure I tested my code with both 8. and 8.2 and got the same bad results. But, like Ian, using 8. does the trick. I guess I just do strange things when I have to work with Microsoft software.

Thanks for your help.

*-------------------------------------------* | Curtis A. Smith | | Defense Contract Audit Agency | | Boeing Huntington Beach Resident Office | | 5301 Bolsa Avenue, M/C H014-A405 | | Huntington Beach, CA 92647-2099 | | Voice: 714-896-3311 x67492 | | FAX: 714-896-6915 | | E-Mail: curtis.smith@dcaa.mil | *-------------------------------------------*


[text/html]


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