Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We were getting the below error when i ran sql query in qlikview.
Error:
ODBC read failed
SELECT DISTINCT a7aacd,A7AIDT,DMAACD,A7AACD ,A7BANB,count(distinct a7banb)as Total_Contracts_May1st_New
FROM dsa7cpp a, dadmrep b
WHERE A.A7AACD = B.DMAACD and ((A7AIDT >= '1160501' AND A7AIDT <='1160508' )OR (A7AIDT >= '1160518' AND A7AIDT<= 1160710)) and a7banb in ( SELECT a0banb FROM dsa0cpp
GROUP BY a0banb having sum(a0amva) <> 0 ) and a7banb in (select bkbanb from inbkcpp) and B.DMM2C# = 'ESIGN' and dmwgst ='Y' GROUP BY a7aacd,A7AIDT,A7AACD,DMAACD,A7BANB
Script code:
LOAD *,date(date#(A7AIDT+19000000, 'YYYYMMDD'),'DD/MM/YYYY') as New_A7AIDTs ;
SELECT DISTINCT a7aacd,A7AIDT,DMAACD,A7AACD ,A7BANB,count(distinct a7banb)as Total_Contracts_May1st_New
FROM dsa7cpp a, dadmrep b
WHERE A.A7AACD = B.DMAACD and ((A7AIDT >= '1160501' AND A7AIDT <='1160508' )OR (A7AIDT >= '1160518' AND A7AIDT<= $(vYesterday))) and a7banb in ( SELECT a0banb FROM dsa0cpp
GROUP BY a0banb having sum(a0amva) <> 0 ) and a7banb in (select bkbanb from inbkcpp) and B.DMM2C# = 'ESIGN' and dmwgst ='Y' GROUP BY a7aacd,A7AIDT,A7AACD,DMAACD,A7BANB;
Thanks..
Hi,
1st check your sql connection with qlikview
2nd check query is working fine or not in sql editior.
Regards
Naresh,
QlikView is case sensitive. Because, you pause the alias name is small but in your where condition it showing Caps.
Script code:
LOAD *,date(date#(A7AIDT+19000000, 'YYYYMMDD'),'DD/MM/YYYY') as New_A7AIDTs ;
SELECT DISTINCT a7aacd,A7AIDT,DMAACD,A7AACD ,A7BANB,count(distinct a7banb)as Total_Contracts_May1st_New
FROM dsa7cpp A, dadmrep B
WHERE A.A7AACD = B.DMAACD and ((A7AIDT >= '1160501' AND A7AIDT <='1160508' )OR (A7AIDT >= '1160518' AND A7AIDT<= $(vYesterday))) and a7banb in ( SELECT a0banb FROM dsa0cpp
GROUP BY a0banb having sum(a0amva) <> 0 ) and a7banb in (select bkbanb from inbkcpp) and B.DMM2C# = 'ESIGN' and dmwgst ='Y' GROUP BY a7aacd,A7AIDT,A7AACD,DMAACD,A7BANB;
Or else, Please share me your data model to see?
- ANIL
Can you post the whole document log?