I adjusted the model per you suggestion and I received the following error outside Arcmap.
ERROR 000732: Input Features: Dataset CURRENT CITATIONS does not exist or is not supported
Failed to execute (FeatureClassToFeatureClass
The Current Citations is a (SDE View)
The Model runs in arcmap.
Code:
# Set the necessary product code
# import arcinfo
# Import arcpy module
import arcpy
# Script arguments
AVL_DBO_Current_Citations = arcpy.GetParameterAsText(0)
if AVL_DBO_Current_Citations == '#' or not AVL_DBO_Current_Citations:
AVL_DBO_Current_Citations = "Database Connections\\AVL.sde\\AVL.DBO.Current_Citations" # provide a default value if unspecified
AVL_sde = arcpy.GetParameterAsText(1)
if AVL_sde == '#' or not AVL_sde:
AVL_sde = "Database Connections\\AVL.sde" # provide a default value if unspecified
CURRENT_CITATIONS = arcpy.GetParameterAsText(2)
if CURRENT_CITATIONS == '#' or not CURRENT_CITATIONS:
CURRENT_CITATIONS = "CURRENT CITATIONS" # provide a default value if unspecified
HISTORIC_CITATIONS = arcpy.GetParameterAsText(3)
if HISTORIC_CITATIONS == '#' or not HISTORIC_CITATIONS:
HISTORIC_CITATIONS = "HISTORIC CITATIONS" # provide a default value if unspecified
HISTORIC_CITATIONS__5_ = arcpy.GetParameterAsText(4)
if HISTORIC_CITATIONS__5_ == '#' or not HISTORIC_CITATIONS__5_:
HISTORIC_CITATIONS__5_ = "HISTORIC CITATIONS" # provide a default value if unspecified
HISTORIC_CITATIONS__3_ = arcpy.GetParameterAsText(5)
if HISTORIC_CITATIONS__3_ == '#' or not HISTORIC_CITATIONS__3_:
HISTORIC_CITATIONS__3_ = "HISTORIC CITATIONS" # provide a default value if unspecified
HISTORIC_CITATIONS__4_ = arcpy.GetParameterAsText(6)
if HISTORIC_CITATIONS__4_ == '#' or not HISTORIC_CITATIONS__4_:
HISTORIC_CITATIONS__4_ = "HISTORIC CITATIONS" # provide a default value if unspecified
CURRENT_CITATIONS__2_ = arcpy.GetParameterAsText(7)
if CURRENT_CITATIONS__2_ == '#' or not CURRENT_CITATIONS__2_:
CURRENT_CITATIONS__2_ = "CURRENT CITATIONS" # provide a default value if unspecified
# Local variables:
# Process: Feature Class to Feature Class
arcpy.FeatureClassToFeatureClass_conversion(CURRENT_CITATIONS, AVL_sde, "Current_Citations", "", "Equip_No \"Equip_No\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,Equip_No,-1,-1;RadioCode \"RadioCode\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,RadioCode,-1,-1;WorkDateTime \"WorkDateTime\" true true false 36 Date 0 0 ,First,#,CURRENT CITATIONS,WorkDateTime,-1,-1;Notes \"Notes\" true true false 40 Text 0 0 ,First,#,CURRENT CITATIONS,Notes,-1,-1", "")
# Process: Append
arcpy.Append_management("'CURRENT CITATIONS'", HISTORIC_CITATIONS, "NO_TEST", "Equip_No \"Equip_No\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,Equip_No,-1,-1;RadioCode \"RadioCode\" true true false 10 Text 0 0 ,First,#,CURRENT CITATIONS,RadioCode,-1,-1;WorkDateTime \"WorkDateTime\" true true false 36 Date 0 0 ,First,#,CURRENT CITATIONS,WorkDateTime,-1,-1;Notes \"Notes\" true true false 40 Text 0 0 ,First,#,CURRENT CITATIONS,Notes,-1,-1", "")
# Process: Delete Identical
arcpy.DeleteIdentical_management(HISTORIC_CITATIONS__3_, "WorkDateTime", "", "0")