Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

inescastelhano
Contributor

Table or view does not exist

Hi folks,

I have a very strange problem. I run a query in SQL (see below) and I get no errors, and the expected result. I run the same query in Qlikview script, and I get the error: "ErrorSource: OraOLEDB, ErrorMsg: ORA-00942: table or view does not exist".

select t1.urg_id, t1.acc_ini_di, t5.hour_dx, t4.acc_det_tr_id, t2.acc_tr_dx, t3.name

from dwh.tableA t1

inner join dwh.tableB t4 on(t1.acc_det_tr_id=t4.acc_det_tr_id)

left join dwh.tableC t2 on (t1.tipo_acc_tr_id=t2.tipo_acc_tr_id)

left join dwh.tableD t3 on (t4.ACC_VAL5_DX = t3.FUNCI_CD and t3.func_cd='MED')

left join dwh.tableE t5 on (t5.hour_id= t1.acc_ini_hr)

where t1.acc_det_tr_id =

    (SELECT max (t5.acc_det_tr_id)

    from tableA t5

    where t5.urg_id=t1.urg_id

    and t5.tipo_acc_tr_id in ('62','56'))

Does anybody have an idea of the cause?

Thanks in advance.

Ines

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Table or view does not exist

maybe the

dwh

missing in the subquery

here t1.acc_det_tr_id =

    (SELECT max (t5.acc_det_tr_id)

    from tableA t5                                                  dwh.tableA

    where t5.urg_id=t1.urg_id

    and t5.tipo_acc_tr_id in ('62','56'))

6 Replies
sureshqv
Esteemed Contributor III

Re: Table or view does not exist

chk with ur tablenames or fieldnames in DB as well in Qlikview   upper or lower case

balrajahlawat
Esteemed Contributor

Re: Table or view does not exist

From this message:

"ErrorSource: OraOLEDB, ErrorMsg: ORA-00942: table or view does not exist".

It seems one of your table or view used in query does not exist in database...Cross check on same

Re: Table or view does not exist

Either the table or view really does not exist, or the user you use to connect with the database has no rights to read data from that table or view.


talk is cheap, supply exceeds demand

Re: Table or view does not exist

Check the Connection string in QlikView. In the connection string please check the schema in which you are running the query. May be in that schema table and view really does not exist

MVP
MVP

Re: Table or view does not exist

maybe the

dwh

missing in the subquery

here t1.acc_det_tr_id =

    (SELECT max (t5.acc_det_tr_id)

    from tableA t5                                                  dwh.tableA

    where t5.urg_id=t1.urg_id

    and t5.tipo_acc_tr_id in ('62','56'))

inescastelhano
Contributor

Re: Table or view does not exist

This was actually my mistake.

Thank you all!

Cheers,

Ines

Community Browser