01-31-2012 01:38 PM
my data resides in an Oracle DB. I extract data from the DB in csv format. For the date field I use
to_char(BIRTH_DT,'DD-MON-YYYY') to get the date. I then import the csv file into SAS using Proc Import.
I extract two sets of data from the ORACLE DB - both different due to other constraints. The BIRTH_DT field is common in both the sets.
When I import one set of data, SAS reads it is a DATE. For the other other set it reads it as DATETIME. I do not understand why the same column is being interpreted by SAS in different ways.
Any help will be deeply appreciated.
01-31-2012 06:55 PM
If I know I'm going to be reading the same layout file multiple times I usually take the data step code generated by PROC IMPORT and modify it to reduce such suprises. That way I control any informats, lengths of string variables,
variable names, labels and such.
02-01-2012 02:02 AM
I figured the issue. In one case all the rows had values for BIRTH_DT, in other data set 10th row was blank. I do not want to discard that row of data since there are other information in the table i would like to use. Do you know if guessingrows will work in such scenario? going to try it out.