| Error |
| Se produjo un error al acceder a la base de datos Incorrect syntax near ')'. [20018] (severity 15) [INSERT INTO FEL_MAYANS.dbo.feel_anulaciones(id, estado, referencia, resultado, xml_resultado, fecha_emision_documento, fecha_hora_anulacion, id_receptor, nit_emisor, motivo_anulacion, numero_documento, uuid, numero, serie) VALUES( 2082, 'PENDIENTE', (select TOP 1 id from FEL_MAYANS.dbo.feel_dtes where referencia collate SQL_Latin1_General_CP1_CI_AS = (select concat(rtrim(tipcgcxc), ' - ', factura) from tbl_ordfac_h where id = ) and resultado = 'CERTIFICADO' ORDER BY dg_fecha_hora_emision DESC), 'PENDIENTE', NULL, (select TOP 1 dg_fecha_hora_emision from FEL_MAYANS.dbo.feel_dtes where referencia collate SQL_Latin1_General_CP1_CI_AS = (select concat(rtrim(tipcgcxc), ' - ', factura) from tbl_ordfac_h where id = ) and resultado = 'CERTIFICADO' ORDER BY dg_fecha_hora_emision DESC), GETDATE(), (select TOP 1 dr_id_receptor from FEL_MAYANS.dbo.feel_dtes where referencia collate SQL_Latin1_General_CP1_CI_AS = (select concat(rtrim(tipcgcxc), ' - ', factura) from tbl_ordfac_h where id = ) and resultado = 'CERTIFICADO' ORDER BY dg_fecha_hora_emision DESC), (select TOP 1 de_nit_emisor from FEL_MAYANS.dbo.feel_dtes where referencia collate SQL_Latin1_General_CP1_CI_AS = (select concat(rtrim(tipcgcxc), ' - ', factura) from tbl_ordfac_h where id = ) and resultado = 'CERTIFICADO' ORDER BY dg_fecha_hora_emision DESC), '', (select TOP 1 uuid from FEL_MAYANS.dbo.feel_dtes where referencia collate SQL_Latin1_General_CP1_CI_AS = (select concat(rtrim(tipcgcxc), ' - ', factura) from tbl_ordfac_h where id = ) and resultado = 'CERTIFICADO' ORDER BY dg_fecha_hora_emision DESC), NULL, NULL, NULL )] |