Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a TABLE -1 and TABLE -2
Table-1 | Table-2 |
Name | Date_key |
ID | Branch_Key |
branch_indicator | Company_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
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
just
t1:
load
*
from table1
where condition Branch_Indicator = 'YES';
load
*
t2:
from table2
condition Company_indictor = 'YES';
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 .
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;
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;
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';
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';
take out store command
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
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