-1
I am making a query in PBI via a View. However, no matter how much I modify the date format, it does not accept.
The View is below:
select
NROREPRESENTANTE AS CodRepresentante,
nroempresa,
seqcliente,
skcategoria,
count(distinct seqnf) as "Clientes Total",
sum(qtdoperacao) as "Produtos Vendidos",
sum(vlroperacao) as "Venda Total",
sum(vlrctobruto) as "Custo Bruto",
sum(vlroperacao*ind_promocao) as VLR_PROMOCAO,
TO_char(DATA, 'DD/MON/YYYY') as DOPER
from dwv_venda
where DATA between to_date('01/JAN/2018', 'DD/MON/YYYY') and
TO_DATE('31/DEZ/2018', 'DD/MON/YYYY')
and acmcompravenda = 'S'
group by data, NROREPRESENTANTE, NROEMPRESA, seqcliente, skcategoria
order by data, NROREPRESENTANTE, NROEMPRESA, seqcliente, skcategoria
I’ve tried to To_date
also, in various ways. I’ve looked at the region in PBI, it’s in Brazil. I don’t know what else to do, because I need to determine the date range to reduce the lines that PBI will consult.
Its original error must have 'DEZ' when the configuration of bank nls or Section is in English probably in the case would be 'DEC'. An output would be between to_date('01/01/2018', 'DD/MM/YYYY') and TO_DATE('31/12/2018', 'DD/MM/YYYY')
– Motta