Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Script error

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..

3 Replies
PrashantSangle

Hi,

1st check your sql connection with qlikview

2nd check query is working fine or not in sql editior.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Ronnie_Taborn
Support
Support

Can you post the whole document log?