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
Opal | Level 21

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
Opal | Level 21

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
Opal | Level 21

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

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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