As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Difference between revisions of "Tips:Forcing all Character Variables when Importing a CSV File"

From sasCommunity
Jump to: navigation, search
(submit Tip)
 
(tip ready)
Line 16: Line 16:
 
<!-- Please do not edit below this line, EXCEPT when promoting a tip -->
 
<!-- Please do not edit below this line, EXCEPT when promoting a tip -->
 
<div style="float:right">Submitted By [[User:ArtCarpenter|Art Carpenter]] ([[User talk:ArtCarpenter|talk]])</div>
 
<div style="float:right">Submitted By [[User:ArtCarpenter|Art Carpenter]] ([[User talk:ArtCarpenter|talk]])</div>
[[Category:Tip to be Reviewed]]
+
[[Category:Tip Ready]]

Revision as of 22:07, 2 May 2015

When using PROC IMPORT to read CSV files, the SCANTYPE=MIXED option is not available. This means that we do not have an option to force variables to be character. The GUESSINGROWS option can be used, but it can be costly for large files, or potentially not sufficient. Although it does require two passes of the data, there is a way to force all columns to be character when using PROC IMPORT on a CSV file.

....read more

Submitted By Art Carpenter (talk)