Hello. I have trying to run a query from an ODBC data base to an excel output file, however I can getting this error about Invalid precision for decimal data type. Below are my queries. Thanks!
select
case
when c.client_bank_product_desc like '%Co-Brand%' then 'Cobrand'
when c.client_bank_product_desc like '%Big Ticket%' then 'Big Ticket'
when c.client_bank_product_desc like '%PLCC%' then 'Private Label'
when c.client_bank_product_desc like '%Proprietary%' then 'Proprietary Card' else '' end as product,
p.mob,
sum(p.defer_sales)+sum(p.revolve_sales) total_sales,
count(p.acct_id) as accounts,
(sum(p.defer_sales)+sum(p.revolve_sales))/count(acct_id) as sales_per_account
from
edw_metrics_nz_prod01.admin.client_exc_vw c
join udb_prod01.profit.profit_actlvl p
on c.div_no = p.div_no
where
p.snapshot_id between '202206' and to_char(now() + interval '-1 month','yyyymm')
and p.open_date > '1997-01-01'
and p.mob <=60
group by
product,
p.mob,
c.div_no,
c.client_alias
order by
product,
p.mob asc;
Are you tryng to output to legacy excel file? Its not your query, its erroring on writing to the file. There's a thread here that may be of interest (they were getting the identical error) - https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Error-when-using-Excel-Legacy-...
User | Count |
---|---|
106 | |
82 | |
72 | |
54 | |
40 |