Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
l_palacios
Contributor III
Contributor III

Need Help with OLEDB READ FAIL error

Sorry to duplicate a question, but I was really hoping someone may be able to help with this error:

I keep getting an oledb read fail from the following. Not a complex query at all and I cannot figure out what could be causing the error. I have followed some of the recommendations throughout other posts on this issue but still seem to get the error 'OLEDB READ FAIL".

When I run the query in toad, it runs with no problem (very fast). However, when I run it in qlikview, it errors. out. We are connecting to an oracle db. Not a complex query at all and I cannot figure out what could be causing the error. Here is my script:

RA_ADDRESSES_ALL:
LOAD
ADDRESS_ID2 as ADDRESS_ID,
SITE_NUMBER2 as SITE_NUMBER;
SELECT /*+RULE */
HCSU.CUST_ACCT_SITE_ID ADDRESS_ID2,
HZPS.PARTY_SITE_NUMBER SITE_NUMBER2
FROM
HZ_CUST_ACCT_SITES_ALL HCAS,
HZ_CUST_SITE_USES_ALL HCSU,
HZ_PARTY_SITES HZPS
WHERE
HCSU.CUST_ACCT_SITE_ID = HCAS.CUST_ACCT_SITE_ID
AND HCAS.PARTY_SITE_ID = HZPS.PARTY_SITE_ID
AND HCSU.SITE_USE_CODE = 'BILL_TO';

STORE RA_ADDRESSES_ALL INTO RA_ADDRESSES_ALL.QVD;

DROP TABLE RA_ADDRESSES_ALL;

Any help is greatly appreciated.

Here is my script:

RA_ADDRESSES_ALL:
LOAD
ADDRESS_ID2 as ADDRESS_ID,
SITE_NUMBER2 as SITE_NUMBER;
SELECT /*+RULE */
HCSU.CUST_ACCT_SITE_ID ADDRESS_ID2,
HZPS.PARTY_SITE_NUMBER SITE_NUMBER2
FROM
HZ_CUST_ACCT_SITES_ALL HCAS,
HZ_CUST_SITE_USES_ALL HCSU,
HZ_PARTY_SITES HZPS
WHERE
HCSU.CUST_ACCT_SITE_ID = HCAS.CUST_ACCT_SITE_ID
AND HCAS.PARTY_SITE_ID = HZPS.PARTY_SITE_ID
AND HCSU.SITE_USE_CODE = 'BILL_TO';

STORE RA_ADDRESSES_ALL INTO RA_ADDRESSES_ALL.QVD;

DROP TABLE RA_ADDRESSES_ALL;

Any help is greatly appreciated.

2 Replies
maxgro
MVP
MVP

The difference could be Toad doesn't use oledb to geet Oracle data


Some thing you can try :


1

for hint you have to add

SET StripComments = 0;

but I don't think this is the problem (just Oracle skip the hint; and Oracle strongly advise to use the CBO)


2

try with a single table and char or varchar field (no number, no date); I once had a problem (oledb read failed) with oledb and regional settings, incorrect data or oledb read error with number (because off . ,) and date





cwolf
Creator III
Creator III

I mean with OLEDB you have to use "as" for renaming columns or tables (standard sql). In oracle sql using of "as" is optional.

RA_ADDRESSES_ALL:

LOAD

ADDRESS_ID2 as ADDRESS_ID,

SITE_NUMBER2 as SITE_NUMBER;

SELECT

HCSU.CUST_ACCT_SITE_ID as ADDRESS_ID2,

HZPS.PARTY_SITE_NUMBER as SITE_NUMBER2

FROM

HZ_CUST_ACCT_SITES_ALL as HCAS,

HZ_CUST_SITE_USES_ALL as HCSU,

HZ_PARTY_SITES as HZPS

WHERE

HCSU.CUST_ACCT_SITE_ID = HCAS.CUST_ACCT_SITE_ID

AND HCAS.PARTY_SITE_ID = HZPS.PARTY_SITE_ID

AND HCSU.SITE_USE_CODE = 'BILL_TO';