w.d 5
|
||
$w. 3
|
||
$w. 4
|
||
$w. 4
|
||
$w. 4
|
||
1The default format is DATETIME. You can use USEDATE=YES to change format from DATETIME. to DATE. You can also use the SASDATEFMT option to change the format to other date or date and time formats. | ||
2The SAS date/time value uses 01Jan1960 as the cutoff date. The Jet provider date/ time value uses 30Dec1899 as the cutoff date. | ||
3The width of $w. is equal to the field size of the column defined in your Microsoft Access table. | ||
4When SCANMEMO=YES (default is NO), the width value of $w. is determined by the longest string of data that is scanned in the field. It can also be determined by the value specified in the DBMAX_TEXT= option, whichever is less. Otherwise, when the option SCAN_TEXT=NO, the width value of $w. is equal to the value specified in DBMAX_TEXT= option. | ||
5The w width value is equal to the precision value plus 1. The d decimal value is equal to the scale value, where precision and scale are defined for the column in the table. |
Text (VarChar) or Memo
(LongText) 1
|
|
Text (VarChar) or Memo
(LongText)1
|
|
Text (VarChar) or Memo
(LongText) 1
|
|
Text (VarChar) or Memo
(LongText)1
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
Number 2
|
|
1If the character format length is greater than 255 characters, the loaded format is Memo. Otherwise, the loaded format is Text. | |
2For Microsoft Access 2000, 2002, and 2003, a SAS numeric data type with no format specified is converted to a number data type with a double field size. If the format is specified as w. in SAS, the loaded data type is a number with a long integer field size. If the format is specified as w.d in SAS, the loaded data type is a number data type with a decimal field size. For Microsoft Access 97, if the format is specified as w. in SAS, the loaded data type is a number with a long integer field size. Otherwise, the SAS numeric data type is converted to a number data type with a double field size. However, you can set the SAS environment variable, LOAD_DBL=YES, to force a SAS numeric data type to be loaded into a numeric data type with a Double field size. |
DATA test; FORMAT j 5. k 6.2; i=123.45; j=12345; k=123.45; RUN; /* The following PROC loads the Test1 table, which contains Column i with a Double field size, Column j with a Long Integer field size, and Column k with a Decimal field size. */ PROC EXPORT DATA=test OUTTABLE= 'Test1' DBMS=ACCESS REPLACE; DATABASE='c:\temp\test.mdb'; RUN; /* The following PROC loads the Test2 table, which contains Columns i, j, and k, all of which have a Double field size. */ OPTIONS SET=load_dbl yes; PROC EXPORT DATA=test OUTTABLE= 'Test2' DBMS=ACCESS REPLACE; DATABASE='c:\temp\test.mdb'; RUN;
/* To have SAS time values exported to Microsoft Access database with SAS date/time base, 01Jan1960. */ OPTIONS SET=TIME_VAL SAS;