We are using scripts and workflows that use the Create Table View / Create Feature Layer with a where clause specified. These functions seem to work (i.e. the correct subsets are shown in ArcMap), but when we try to use Copy Rows / Copy Features, it appears that the where clause is not being observed (i.e. all the records in the original data are copied).
The issue showed up when we tried the scripts on our 10.1 machines (Python 2.7), but it's working fine on our 10.0 machines (Python 2.6). Does anyone know (or can guess) what is going on here? I've looked, but I haven't seen any documented changes between 10.0 and 10.1 as far as how views behave or how the copy functions work.
The script actually works in 10.1 when the source data (that the view/layer is based on) is coming from a personal GDB; however, when using an SDE connection the copy fails as described. We have also run through the gamut of field enclosures (assuming SDE is the issue), but again, this is working fine in 10.0.
Similarly, using ArcMap 10.1, we can create a proper feature layer with the toolbox (which creates the layer subset with a definition query based on the SDE layer). But when we use the Copy Features tool, all of the records are copied.
I have not played around with the workspace parameter -- could this cause issues?