Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

davinfrost
New Contributor III

odbc read failed

morning fellas, i have a question,

so i got ODBC read failed on my qvw, here it is

ODBC read failed
Inv:
sql 
Select distinct
v.invoiceno,
v.termsid,
pd.name,
pd.PersonNo,
d.DEPTNO,
d.DEPTNAME,
y.projectno,
y.projectname,
v.invoicedate,
vd.itemno,
va.itembaseamount,
v.termdiscount,
v.invoiceamount,
S.salesmanid,
--S.FirstName,
--S.LastName,
(S.FirstName||' '||S.LastName),
(v.invoicedate + tp.netdays),
ar.GLYEAR,
ar.GLPERIOD,
v.termdiscount,
max(ar.CHEQUEDATE)
from arinv v
left join TERMOPMT tp on v.termsid = tp.termid
left join ARINVPMT ap on v.ARINVOICEID=ap.ARINVOICEID
left join ARPMT ar on ap.PAYMENTID = ar.PAYMENTID
left join arinvdet vd on v.arinvoiceid = vd.arinvoiceid
left outer join VIEW_ARINVDET(v.ARINVOICEID, vD.SEQ, 1, vD.ARINVOICEID) Va on v.ARINVOICEID=va.ARINVOICEID
left join persondata pd on v.customerid = pd.id
left join DEPARTMENT d on vd.DEPTID = d.DEPTID
left join project y on ar.PROJECTID = y.PROJECTID
left join salesman s on v.SALESMANID = s.SALESMANID
where 
v.termsid =1
and v.DELIVERYORDER = 0 and (ar.glyear >= 2017
and extract(year from v.invoicedate)>=2017)
group by v.invoiceno,
v.termsid,
pd.name,
pd.PersonNo,
d.DEPTNO,
d.DEPTNAME,
y.projectno,
y.projectname,
v.invoicedate,
vd.itemno,
va.itembaseamount,
v.termdiscount,
v.invoiceamount,
S.salesmanid,
--S.FirstName,
--S.LastName,
(S.FirstName||' '||S.LastName),
(v.invoicedate + tp.netdays),
ar.GLYEAR,
ar.GLPERIOD,
v.termdiscount

how to solve this? i've tried this query and it works on flamerobin.

many thanks.

1 Reply
Highlighted
prieper
Honored Contributor II

Re: odbc read failed

Not sure, whether your SQL-interpreter understands "Select distinct".
Else, suggest to handle the query in slices and see, which part runs into error and check for spelling-errors or the like