Table to Table Tool

1207
3
10-19-2011 12:21 PM
TedCronin
MVP Honored Contributor
When running the GP tool Table to Table, if I set a SQL expression in the tool, I am receiving an error 999999, The table was not found, however, if I run the exact same tool without the SQL expression, the tool completes as expected.
0 Kudos
3 Replies
DrewFlater
Esri Contributor
Hi Ted, what is the format of your input table? If it is a .csv, .txt, or other format that does not have an ObjectID field then SQL expressions will not work (this is a known issue for these types of tables). One thing you might try is to use the Table Select (analysis) tool with the same expression.

Drew - Esri
0 Kudos
TedCronin
MVP Honored Contributor
I will.  It is actually a SQL Server table, not in SDE.  Isn't the database work at 10.1 more integrated?  Like I said, I will take a look at table select, so thank you.  I kinda kills my script, so its nice to have a  workaround.
0 Kudos
TedCronin
MVP Honored Contributor
So, for a little follow up.  If I run the Table to Table tool where I import a SQL Server table that resides in SQL 2008 R2, I cannot use the SQL to delineate a subselection.  I can import the whole table no problem.  If I run the Table2Table for a table that resides inside a File GB, it runs and takes about 9 minutes and 53 seconds to complete.  If I run the Table Select, the same process takes 6 minutes 0 Seconds to complete, both using SQL, and both starting in a file GB, hence both have an object ID, and both expected behavior.  What I don't understand is why one tool is thee minutes slower when selecting the same amount of table records and then extracting it to a file GB?
0 Kudos