Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

Hi team

I have two tables. Table1 contains the all student details and Table contains only Passed student ID's. How can i get the only Failed student details.(I want load only fail student detilas).

             Table1:

S.ID          S.name      DOB             District

1             xxxxx          10051991      KADAPA

2             yyyyyy        10071991       CHITTORE

3            eeeeeee        05021991      NELLORE

4            ssssss          10051991      ANATAPUR

5.            nnnnn           03031991      KADAPA

              Table2:

S.ID(Passed)

1

3

4

I want load only fail student details; ( no need to load all table from the file)

EX:  OUTPUT

S.ID   S.name         DOB             District

2        yyyyy         10071991         CHITTORE

5        nnnnn          03031991        KADAPA

1 Solution

Accepted Solutions
vinieme12
Champion II
Champion II

i think you may need an Alias field here .. no you won;t

Table2:

load * inline [

S.ID

1

3

4

];

load * inline [

S.ID,S.name,DOB,District

1,xxxxx,10051991,KADAPA

2,yyyyyy,10071991,CHITTORE

3,eeeeeee,05021991,NELLORE

4,ssssss,10051991,ANATAPUR

5,nnnnn, 03031991,KADAPA

] where not Exists([S.ID]);

View solution in original post

13 Replies
Anil_Babu_Samineni

May be use Not Exists([S.ID]) for your second one

Load * From Table1;

Load * From Table2 where Not Exists([S.ID]);

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

I would just change the order here

Load * From Table2;

Load * From Table1

Where Not Exists([S.ID]);

neha_shirsath
Specialist
Specialist

Hi,

You can use where not exist or you can do -

table 1

right join

table 2

Thanks,

Neha

vinieme12
Champion II
Champion II

i think you may need an Alias field here .. no you won;t

Table2:

load * inline [

S.ID

1

3

4

];

load * inline [

S.ID,S.name,DOB,District

1,xxxxx,10051991,KADAPA

2,yyyyyy,10071991,CHITTORE

3,eeeeeee,05021991,NELLORE

4,ssssss,10051991,ANATAPUR

5,nnnnn, 03031991,KADAPA

] where not Exists([S.ID]);

View solution in original post

Kohli
Creator II
Creator II
Author

But i take the same data from database, but it's not working.

ODBC CONNECT TO co;

Table1:

LOAD SID;

SQL SELECT *

FROM mohan.dbo.studentpassdetails;

Table2:

LOAD SID,

    Student,

    address,

    DOB;

SQL SELECT *

FROM mohan.dbo.Studentdetails

where not exists SID;

Please help me

;

sunny_talwar

Try putting parenthesis around SID within Where not Exists()

Table1:

LOAD SID;

SQL SELECT *

FROM mohan.dbo.studentpassdetails;

Table2:

LOAD SID,

    Student,

    address,

    DOB;

SQL SELECT *

FROM mohan.dbo.Studentdetails

Where not Exists(SID);

Kohli
Creator II
Creator II
Author

i got error in this type:

SQL##f - SqlState: 37000, ErrorCode: 102, ErrorMsg: [Microsoft][SQL Server Native Client 11.0][SQL Server]Incorrect syntax near 'SID'.

SQL SELECT *

FROM mohan.dbo.Studentdetails

where not Exists (SID)

sunny_talwar

My bad, try this

Table1:

LOAD SID;

SQL SELECT *

FROM mohan.dbo.studentpassdetails;

Table2:

LOAD SID,

    Student,

    address,

    DOB

Where not Exists(SID);

SQL SELECT *

FROM mohan.dbo.Studentdetails;

Kohli
Creator II
Creator II
Author

Yes It's working. Thanks sunny.

At the same time, If i have

Table1:

SID1

Table2

SID

How can i use that statement. (where not Exists(SID))