Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Joining Condition during QVD files.

Hi All,

I have a TABLE -1 and TABLE -2

Table-1Table-2
NameDate_key
IDBranch_Key
branch_indicatorCompany_key
Company_indicator
Party_Key

I need to create Three QVD's

1. Table2.qvd

2. Table1a.qvd  ( This should have condition Branch_Indicator = 'YES')

3.Table1b.qvd (This Should Have condition Company_indictor = 'YES')

I will be joining TABLE 1A.PARTY_KEY with TABLE2.BRANCH_KEY   and   TABLE 1B.PARTY_KEY with TABLE2.COMPANY_KEY.

This is because, on first condition, I need to get the info of Branches alone. And Second condition, I need to get comapany info.

Can any one pls help me with this ?

Regards,

Praveen

1 Solution

Accepted Solutions
Not applicable
Author

ok

do one thing first create qvd

in down means after store statment

load

col1

col2

resident table  (here tbale is your tablename,make it if ur table name is table1 then  resident table1)

WHERE BRANCH_INDICATOR ='Y';

i hope u understand if not come again

View solution in original post

12 Replies
Not applicable
Author

just

t1:

load

*

from table1

where condition Branch_Indicator = 'YES';

load

*

t2:

from table2

condition Company_indictor = 'YES';

sujeetsingh
Master III
Master III

It is okay, you can join them simply on the Key you are having in your model or you can use composite key to join them .

Not applicable
Author

Hi manoj,

Thanks for your reply.

But I dont know, how to mention it in QVD.

Below is how I have my QVD structure

ALIAS Table_name:

LOAD

Col1

Col2

-

-;

SQL SELECT *

From "TABLE_NAME";

STORE ALIAS Table_Name into  xx.qvd;

sujeetsingh
Master III
Master III

All joined in one table

Tab:

LOAD * INLINE [

    ID, Branch, Company, Party_Key

    1, Yes, AA, 11

    2, S, Yes, 22

    3, Yes, Yes, 33

    4, Yes, Yes, 44

    5, Yes, VV, 55

];

Tab1:

LOAD * INLINE [

    Date_Key, Branch_Key, Company_Key

    1, 11, 22

    2, 33, 33

    3, 44, 22

];

left join

LOAD

Party_Key as Branch_Key

,ID as BranchID

Resident Tab Where Branch='Yes';

left join

LOAD

Party_Key as Company_Key

,ID as companyID

Resident Tab Where Company='Yes';

DROP Table Tab;

Not applicable
Author

t1:

load

col1

col2

sql select *

from ''tablename''  \file.qvd

where condition Branch_Indicator = 'YES';

t1:

load

col1

col2

sql select *

from ''tablename''  \file.qvd

where condition Company_indictor = 'YES';

Not applicable
Author

Hi Manoj,

I am getting EXECUTION FAILED for the script, which you gave.

I have written as below :

TABLE:

LOAD

col1

col2;

SQL SELECT *

FROM Table_name;

STORE TABLE into C:\Qlikview\TABLE.qvd

WHERE BRANCH_INDICATOR ='Y';

Not applicable
Author

take out store command

Not applicable
Author

But, Without that how can I save it as qvd.

Actually I m taking the source from SQL, and saving as QVD. I am just in the process of QVD creation

Not applicable
Author

ok

do one thing first create qvd

in down means after store statment

load

col1

col2

resident table  (here tbale is your tablename,make it if ur table name is table1 then  resident table1)

WHERE BRANCH_INDICATOR ='Y';

i hope u understand if not come again