I am running Arc 10.3 in a versioned environment. I am attempting to write a simple code that will select service records coming from Oracle CRM to a separate feature class containing only records that meet the SQL definition query that the user will enter. (Both feature classes, the Oracle CRM data and the new feature class CRM1 have the exact same field schema) The definition query will be a select records > than such and such date. I have the basics down but when I enter the SQL where clause it does not select any records.
Below is only the code for selecting out the records, the append part is not yet started as I can't get the select part to work first!
SQL Clause I am using : "REPORTED_DATE" > date '2015-06-13 00:00:00' (REPORTED_DATE is my field in both Oracle CRM and CRM1 that contains my date reported for the service requests)
Pic of my Model -
# Import system modules import arcpy from arcpy import env # Set workspace env.workspace = "Z:/Projects/sharedData/SMTEST.gdb/" # Set local variables in_features = "Z:/Projects/sharedData/SMTEST.gdb/CRM_ATTACH" out_feature_class = "z:/Projects/sharedData/SMTEST.gdb/CRM_ATTACH1" where_clause = raw_input() # Execute Select arcpy.Select_analysis(in_features, out_feature_class, where_clause)