Answer the question
In order to leave comments, you need to log in
How to remove a field from Group by?
Hello,
there is a question on request, the request is as follows:
select
decode (ep.ext_brand, ' ', 'PR',
'YR') brand,
case
when ep.type_op < 30 then 'VPM' else 'VAD' end flow,
'RU',
lp.id_produit,
sum(lp.qte_a_preparer)
from
entete_op ep,
ligne_op lp,
entete_op_client epc
where
ep.id_op = lp.id_op and
ep.id_op = epc.id_op and
ep.etat < 2000
group by ep.ext_brand, lp.id_produit, ep.type_op
Answer the question
In order to leave comments, you need to log in
the same case as in the select may well live in group by, more precisely, it probably cannot, but must
The ep.type_op field has multiple values, and I only need two.
I need to get a parameter if less than 30 then 'value 1' otherwise 'value 2' -> what I described using CASE in the select.Add a calculated field to the table or make a view.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question