I have this union query, it takes about 5 minutes to run, but if I separate each select, each one takes seconds, what am I doing wrong?
SELECT "sin asignar" AS type, [chrbanco], [chrmoneda], [dtmfechamovimiento], [fltimporte], val([chrnumerooperacion]) AS operacion, [chrtransaccion], 1
FROM...