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

List the names of the Students who have not enrolled for Java course

I have 3 tables

Student:

SQL SELECT NAME,

    ORIGIN,

    sid as SID,

    TYPE

FROM School.dbo.StudentMaster;


Course:

SQL SELECT CATEGORY,

    CID,

    FEE,

    NAME as CNAME

FROM School.dbo.CourseMaster;


Enrollment:

SQL SELECT CID,

    DOENROOL,

    FREEWAIVERFIAG,

    GRADE,

    SID

FROM School.dbo."ENROLL_MASTER";


I can write the code in SQL using subqurey  , but I am unable to write expression / set analysis in qlikview . Can any one help.
     

Select name

from StudentMaster

where sid not in

                            (select distinct Sid from ENROLL_MASTER e

                             join CourseMaster c on e.cid = c.CID

                              where c.name = 'java')



9 Replies
neelamsaroha157
Specialist II
Specialist II

Use NAME as the dimension and expression as

Count({<CNAME = {'java'}>}SID)

kalyanamharish
Contributor III
Contributor III
Author

I don't think this is completely correct , because when I execute SQL code I get only 13  students which is the correct , but when i write the expression given by you in a straight table I get all the students which is 16  


Count({<CNAME - = {'java'}>}SID)

more over I do not understand why you wrote both dimension and expression to resolve this issue because I only need names of student who DID NOT enrolled for JAVA. I think a text object would be sufficient to display the names like a list.

vishsaggi
Champion III
Champion III

may be this Neelam?

= Count({<CNAME -= {'java'}>}SID)

kalyanamharish
Contributor III
Contributor III
Author

Yep I tried that too, But no change

neelamsaroha157
Specialist II
Specialist II

You are right, I missed that it was a 'not' condition.

Chanty4u
MVP
MVP

may be this?

= Count({<CNAME /= {'java'}>}SID)

kalyanamharish
Contributor III
Contributor III
Author

I don't need count ,I only need names of students who did not enrolled to JAVA as a list .

neelamsaroha157
Specialist II
Specialist II

There are multiple ways to get it work. i mentioned dimension and expression because I thought you are using it in a table. I don't think text box is the best way to approach this.

If you are just looking for the list either go with straight table (hiding the expression field) or you you can go with the list box as well with the above expression.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Qlik Expression equivalent of your SQL query would be:

concat({<SID=E({<CNAME={'Java'}>})>}NAME, ', ')

-Rob

http://masterssummit.com

http://qlikviewcookbook.com