arcpy.TableSelect_analysis(in_table, out_table, {where_clause})
"Selects table records matching a Structured Query Language (SQL) expression and writes them to an output table."
Using the arcpy.TableSelect_analysis() function I have this simple script:
import arcpy
from arcpy import env
env.workspace = r'\\gisfile\GISstaff\Jared\ModelBuilder\JaredTest.gdb'
#variables
intable = r"\\gisfile\GISstaff\Jared\ModelBuilder\JaredTest.gdb\ElectionResults_Nov2016"
outtable = r"\\gisfile\GISstaff\Jared\ModelBuilder\JaredTest.gdb\Results3"
where_clause = "ContestTitle = 'BALLOTS CAST - TOTAL'"
arcpy.TableSelect_analysis(intable, outtable, where_clause)
It selects all records named 'BALLOTS CAST - TOTAL' from the 'ContestTitle' column of my 'ElectionResults_Nov2016' table and writes them in the newly created 'Results3' table. 'BALLOTS CAST - TOTAL' is only one of 58 separate table record names.
How can I write all 58 to their own tables?
ExecuteError: ERROR 000210: Cannot create output \\gisfile\GISstaff\Jared\ModelBuilder\TEST folder\TEST.gdb\COUNTY BOARD MEMBER DISTRICT FOUR(note: I changed the output location)It may be, as you said, because of the value variable. I'll look into it. But, overall it did as I wanted. Thanks!
– Pfalbaum Jan 19 '18 at 21:00