[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1557
  • Last Modified:

PROC Export

I use SAS Version 9.1 and am interested in PROC Export.  What I want to do is output numbers to tables in an MS Access database without losing the end zeroes, e.g. 9.20 stays 9.20 and doesn't become 9.2 in the database.  If I just write

data DCB;
set allpay
if locality="DCB";
proc export data= DCB
              outtable="DCB"
              dbms=access
              replace;
     database="c:\paytables\Pay2005.mdb"

The zeroes get lost.  Any way to keep them?  Thanks!
0
ratclijh
Asked:
ratclijh
1 Solution
 
TDSnetCommented:
Hi,

You will have to make that field a text field.  It's pretty much an MS standard across their apps.  If a numeric field has any leading or trailing zeros then they are truncated.  The only work around is to save the field as text and then if you need to do calculations on it use a CONVERT or some equivelant function.

Cheers,
Jack
0
 
ratclijhAuthor Commented:
Yep, I ended up just using a put statement in SAS.  The values began life as numeric because they were calculated in my program but had to be text or the zeroes got dropped.

Thanks again.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now