Fix max id su esportazione food process

This commit is contained in:
2024-07-04 11:01:36 +02:00
parent 819f0c8ce0
commit 6d8cba5d07

View File

@@ -124,7 +124,7 @@ public class FoodProcessRestService {
// Articolo nuovo, creo un nuovo id
if (mtbAartAnag == null) {
sql = Query.format(
"SELECT CAST(ISNULL(MAX(cod_mart_anag), 0) + 1 AS VARCHAR) AS cod_mart_anag\n" +
"SELECT CAST(ISNULL(MAX(CAST(cod_mart_anag AS INT)), 0) + 1 AS VARCHAR) AS cod_mart_anag\n" +
"FROM mtb_aart_anag\n" +
"WHERE cod_anag = %s",
codAnagTopControl