Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Select and Join On in Qlikview


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

Re: Select and Join On in Qlikview

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

Community Browser