I know that Hop usually dislikes semicolons at the end, while DBeaver has no issues with them.
It's counterintuitive here because the error messages states that a semicolon is required - but then, it's in your code. Did you try and just remove it? For me, this is usually the only difference between Hop and Dbeaver. > On 2024-03-06 9:20 AM EST Eric Sánchez Tamayo via users > <[email protected]> wrote: > > > > Hi. > > > > In an SQL Script step, I'm performing this Merge that works perfectly fine > with DBeaver: > > > > MERGE INTO DES_DV.dv_maes_almacen AS a > > USING ( > > SELECT DISTINCT > > Cod_Almacen as id_almacen_nk, > > Almacen as almacen > > FROM des_ds.ds_almacen > > ) b > > ON (a.id_almacen_nk = b.id_almacen_nk) > > WHEN MATCHED > > AND ( > > a.almacen <> b.almacen > > AND a.flag <> 'new' > > ) > > THEN > > UPDATE SET > > a.almacen = b.almacen, > > a.flag = 'changed', > > a.fecha_etl_modificacion = GETDATE() > > WHEN NOT MATCHED THEN > > INSERT ( > > id_almacen_nk, > > almacen, > > flag > > ) > > VALUES ( > > b.id_almacen_nk, > > b.almacen, > > 'new' > > ); > > > > However, when I put it in the SQL Script step, I encounter the following > error: SQL Error [10713] [S0001]: A MERGE statement must end with a semicolon > (;). What problem could be happening? > > > > Best regards. >
