Jamal,
Although the first screenshot is not fully displaying your SQL statement, I think I see a "SELECT TOP" statement being used in SQL Server Management Studio. Why do you use the "TOP" keyword, as it is normally used to restrict the number of records returned in case of very large tables and query results?
This option shouldn't be used if you want to return all records of the feature layer's base table after having run the Python script, you should use a plain "SELECT" statement.
Because in all case, in my particular database the number of records is less than 1000! This is why I aimed at using that option.
Still don't get it... If you only have a test database with a couple of records like yours, TOP can be left out. I think there is not much use for this option anyway, unless in very specific cases or running test queries against very large datasets. And your target was to determine if all edits of the database were properly reconciled & posted & compressed to the base table, so you want all records.
And if you entered "SELECT TOP 50 PERCENT" in the query that I can't read from your screenshot, that would definitely explain 20 records of 41 being returned from the feature layers base table even with a successful operation... :rolleyes: But I figure I don't have to explain that to you! 😉
Best,
Marco
Jamal,
You probably have, but since you don't state it, I ask it here explicitly anyway: have you run the same SQL statement in SQL Server Management Studio without the redundant "TOP 1000" keyword text? Did you get the same results (it should, but who knows...)? I think you can simply remove the "TOP 1000" text in the edit / SQL window visible in your screenshot, and than hit "Execute" to do this.
I also think it may be time to have a closer look at all the new tools in the Geodatabase Administration toolset, and see if you can figure out if there are any differences in the reported geodatabase state before and after each run of the script. I know you already looked at some of these options, as it is in your screenshots, but have you checked everything?