Hello,
How to customize TOAD formatter?
I have this query:
SELECT DECODE (COUNT (‘x’), 0, 1, 0)
INTO o_return
FROM TBL_COMITES_AFIL c
WHERE c.cod_op = i_cod_op
AND c.cod_dni = i_cod_dni
AND c.flg_motivo_op = 1
AND NOT (
(c.cod_op, c.cod_dni) IN (SELECT r.cod_op, r.cod_dni FROM tbl_representantes r WHERE cod_motivo_baja <> ‘01’)
OR (c.cod_op, c.cod_dni) IN (SELECT x.cod_op, x.cod_dni FROM TBL_COMITES_AFIL x WHERE x.cod_op = c.cod_op AND x.cod_dni = c.cod_dni AND x.nro_entrega <> c.nro_entrega AND x.flg_motivo_op <> 1)
OR (c.cod_op, c.cod_dni) IN (SELECT x.cod_op, x.cod_dni FROM TBL_padron_afil x WHERE x.cod_op = c.cod_op AND x.cod_dni = c.cod_dni)
);
As you see, I would like that “OR” statements get in one line.
But formatting with TOAD results in:
SELECT DECODE (COUNT (‘x’), 0, 1, 0)
INTO o_return
FROM TBL_COMITES_AFIL c
WHERE c.cod_op = i_cod_op
AND c.cod_dni = i_cod_dni
AND c.flg_motivo_op = 1
AND NOT ( (c.cod_op, c.cod_dni) IN
(SELECT r.cod_op, r.cod_dni
FROM tbl_representantes r
WHERE cod_motivo_baja <> ‘01’)
OR (c.cod_op, c.cod_dni) IN
(SELECT x.cod_op, x.cod_dni
FROM TBL_COMITES_AFIL x
WHERE x.cod_op = c.cod_op
AND x.cod_dni = c.cod_dni
AND x.nro_entrega <> c.nro_entrega
AND x.flg_motivo_op <> 1)
OR (c.cod_op, c.cod_dni) IN
(SELECT x.cod_op, x.cod_dni
FROM TBL_padron_afil x
WHERE x.cod_op = c.cod_op
AND x.cod_dni = c.cod_dni));
Is it possible to format code in a custom way?