BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jcis7
Pyrite | Level 9

G'day.

Appreciate any help you can give.

I realized it saves space in MS Access if a numeric field has a length of 'Long Integer' instead of 'Double'.

When I use the following code, SAS exports numeric fields into MS Access as 'Double' instead of 'Long Integer'.  Is it possible to ask SAS to specify the field size as 'Long Integer' instead of 'Double'?  Thanks!

PROC EXPORT DATA= WORK.want
OUTTABLE= "Want" 
DBMS=ACCESS REPLACE;
DATABASE="W:\Databases\&database"; 
RUN;
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

I suggest you give it a try with LONGINT and see how you get on. 9(5) means a decimal with 5 decimal places and a total length of 9 digits.

View solution in original post

5 REPLIES 5
jcis7
Pyrite | Level 9
Appreciate your help! For the example I copied and pasted from one link you included, I've a few questions:

1) If I wanted the type to be long integer, do I use LONGINT instead of SMALLINT?

2) What does the '9(5)' mean?

Thank you!



Example 3: Specify a Data Type for a Column in a New Table
This example creates a new Teradata table, NEWEMPLOYEES, and specifies a data type and attributes for the EMPNO column. The example encloses the Teradata type and attribute information in double quotation marks. Single quotation marks conflict with single quotation marks that the Teradata FORMAT attribute requires. If you use single quotation marks, SAS returns syntax error messages.
data mydblib.newemployees(dbtype= (empno="SMALLINT FORMAT '9(5)'
CHECK (empno >= 100 AND empno <= 2000)"));
set mydblib.employees;
run;




SASKiwi
PROC Star

I suggest you give it a try with LONGINT and see how you get on. 9(5) means a decimal with 5 decimal places and a total length of 9 digits.

jcis7
Pyrite | Level 9

Thank you! One last question:  Is there anyway to change it in an existing table?

SASKiwi
PROC Star

This isn't really a SAS question. I suggest you Google Microsoft Access modify table column type.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1470 views
  • 1 like
  • 2 in conversation