I am trying to use the "stats" option in sdelayer but keep getting "Error: Layer not found (-20). Any ideas what my cause this error?
Without more information, I doubt you will get much response. For example, what is the command you are issuing? There are numerous ways to mess up syntax, without seeing the actual and complete command generating the error, it is difficult to offer any suggestions. Also, it is helpful to include information about server and client versions, including for the DBMS.
Take a look at this thread:
Setting permission on feature dataset with sdelayer don't work
And look at the last reply by Russell Brennan at the bottom for some potential assistance.
Retrieving data ...