Solved! Go to Solution.
import arcpy
from arcpy import env
#Setting the env workspace to be an SDE geodatabase
#
env.workspace = r'C:\sde_at_DB101.sde'
#Getting the existing polygon feature class as input parameter
#
GetExistingPolyFC = arcpy.GetParameterAsText(0)
GetPolyFC = GetExistingPolyFC
# Truncate a feature class if it exists
#
if arcpy.Exists(GetPolyFC):
arcpy.AddMessage("Polygon feature class exists, start working...")
arcpy.TruncateTable_management(r'C:\sde_at_DB_101.sde\%s' %GetPolyFC)
arcpy.AddMessage("Truncating table is complete")
else:
arcpy.AddMessage("Polygon feature class does not exist")