SQL Error 2017 when deleting a territory

Hi all,

Was hoping you would be able to help me out here. I am trying to delete some subterritories but every time I do, I get a SQL Error 207. When I looked in the SQL log files I found the following line:

Mar 15 2018 9:36:08.699 4008 3476 1 fselectsql,time,sql,errormsg 16 SELECT Btch_batchprogressid FROM BatchProgress WHERE btcc_secterr >= -1340080118 AND btcc_secterr<= -1339031542 AND btch_Deleted IS NULL Invalid column name 'btcc_secterr'

I looked in the BatchProgress table and:

1. The table's prefix is btch, not btcc

2. There is no ****_secterr field anyways that it could be looking at

Any idea how I can go about resolving this?

Thank you!

  • 0

    Ivan

    BatchProgress is custom table.

    Was this created as an Entity using the Advanced Customization Wizard? Is this defined as a top level entity (covered by security).

    Have you looked at its definition in custom_tables?

    You may need to see what is listed in the bord_prefix column and what the columns are actually called.

  • 0

    Hi Jeff,

    Thanks for the quick reply. I did check in the Custom_Tables and in Custom_Edits and found that the column names in the Custom_Edits table had different prefixes from the prefix specified in Custom_Tables. It's quite messy so I cleaned up the table, did a metadata refresh and it is deleting now.

    Thank you!

    Ivan