Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select and Join On in Qlikview


Hi, I have the following SQL select join in Qlikview and I'm struggling to get it to work. Works fine elsewhere.

Is there some obvious im missing or a better way to do it?

SQL##f - SqlState: S0002, ErrorCode: 208, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'REPTABLE_MDM'.

tblStatus:

SQL select uname,

'Displaced' as Tracking_Status

from REPTABLE_MDM A

join (select distinct uitemno from REPTABLE_MDM

where yearmonthvalue between 201312 and 201404 and category='Permission ID'

and uitemno is not null) as C ON A.uitemno=C.uitemno

where A.yearmonthvalue=201404 and not exists(select distinct uitemno from REPTABLE_MDM B

where yearmonthvalue=201404 and category='Permission ID'

and uitemno is not null

and A.uitemno=B.uitemno);

2 Replies
Not applicable
Author


Have you tried to make the join separately:

1- Table_1::

     LOAD *, 'Displaced' as Trackin_Status;

     SQL select uname;

Store Table _1;

drop table_1;

2.: Table_2:

     LOAD *;

    SQL select distinct uitemno from rep ............... and A. uitemno = B.uitemno);

Store Table_2;

drop Table_2

3.- finally

     Table_Final:

     load * from Table_1;

     join(Table_Final)

     load * from Table_2;

I hope this would be useful

Regards,

Marcelo

hic
Former Employee
Former Employee

Since you have the error message "Invalid object name 'REPTABLE_MDM' ", I assume that this table does not exist in the default library of the ODBC. So, you have the wrong library in your ODBC connection.

If you add the library to your SELECT statement, i.e.

     SQL SELECT ... FROM <Library>.REPTABLE_MDM

it should probably work.

HIC