Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left inner join and get only null rows

Hi,

We would like to get users' job name and the result should give us jobname 'NoJob' unless the user has not job name  How could we do that in qlickview.

Thanks

Users 

ID
Name
1Alan
2Jack
3Aly

UsersJob

ID
UserId
JobName
11lkjlklj
23sdfsdfsdf

SELECT    Users.ID,Users.Name,isnull(JobName,'NoJob') as JobName'
FROM        Users LEFT OUTER JOIN
                     UsersJob ON Users.ID = UsersJob.UserID
1 Solution

Accepted Solutions
Not applicable
Author

First make qvds : Users & Userjob from the Db tables

then,

Users:

mapping load * from Userjob.qvd;

JobNames:

Load *,

applymap('Users',ID,'NoJob') as JobName

from Users.qvd;

Regards

View solution in original post

2 Replies
Gysbert_Wassenaar

Try using a mapping table and applymap:

JobMap:

mapping load UserId,JobName

from ...somewhere...;

Users:

load ID, Name, applymap('JobMap',ID,'NoJob') as JobName

fro ...somewhereelse...;


talk is cheap, supply exceeds demand
Not applicable
Author

First make qvds : Users & Userjob from the Db tables

then,

Users:

mapping load * from Userjob.qvd;

JobNames:

Load *,

applymap('Users',ID,'NoJob') as JobName

from Users.qvd;

Regards